Skip to content

Commit

Permalink
Bump vite to 5.4.14 (#2312)
Browse files Browse the repository at this point in the history
  • Loading branch information
r100-stack authored Jan 30, 2025
1 parent 55cc09e commit e614a0e
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 381 deletions.
5 changes: 3 additions & 2 deletions apps/css-workshop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview --host",
"preview": "npx -y serve dist --listen 3050 -L",
"clean": "rimraf dist && rimraf node_modules && rimraf .turbo",
"approve": "backstop --config=./backstop/backstop.cjs approve",
"test:only": "backstop --config=./backstop/backstop.cjs test --docker",
"test": "npm-run-all -p -r \"preview\" \"test:only {1}\" --"
"test:only:wait-for-preview": "npx -y wait-on http://localhost:3050 && pnpm run test:only",
"test": "npm-run-all -p -r \"preview\" \"test:only:wait-for-preview {1}\" --"
},
"prettier": "configs/prettier-astro-config.js"
}
2 changes: 1 addition & 1 deletion packages/itwinui-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"typescript": "5",
"vite": "~5.1.8",
"vite": "~5.4.14",
"vitest": "^1.2.1"
},
"peerDependencies": {
Expand Down
12 changes: 12 additions & 0 deletions packages/itwinui-react/src/styles.js/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ export default defineConfig({
},
},
plugins: [
// https://github.com/vitejs/vite/pull/16051#issuecomment-2076616816
{
name: 'css-module-side-effectful',
enforce: 'post',
transform(_, id) {
if (id.endsWith('.module.css')) {
return {
moduleSideEffects: 'no-treeshake',
};
}
},
},
{
name: 'copy-files-after-build',
closeBundle: async () => {
Expand Down
Loading

0 comments on commit e614a0e

Please sign in to comment.