Merge pull request #322 from Coffey-Labs/vite-8
Move the build to vite 8, and chunk the way rolldown wants
This commit is contained in:
@@ -347,7 +347,7 @@ missing.
|
||||
|
||||
## Development
|
||||
|
||||
Requirements: Node ≥ 20.10 (22 recommended), npm ≥ 10.
|
||||
Requirements: Node ≥ 20.19 (22 recommended), npm ≥ 10.
|
||||
|
||||
```bash
|
||||
npm install
|
||||
|
||||
Generated
+581
-1476
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -10,7 +10,7 @@
|
||||
"web"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=20.10"
|
||||
"node": ">=20.19"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "concurrently -n server,web -c blue,magenta \"npm run dev -w server\" \"npm run dev -w web\"",
|
||||
|
||||
+2
-2
@@ -25,10 +25,10 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/react-dom": "^19.2.7",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"@vitejs/plugin-react": "^6.1.1",
|
||||
"jsdom": "^26.0.0",
|
||||
"typescript": "^5.7.3",
|
||||
"vite": "^6.2.0",
|
||||
"vite": "^8.3.0",
|
||||
"vitest": "^4.1.11"
|
||||
}
|
||||
}
|
||||
|
||||
+16
-4
@@ -44,11 +44,23 @@ export default defineConfig({
|
||||
build: {
|
||||
target: "es2022",
|
||||
sourcemap: false,
|
||||
rollupOptions: {
|
||||
rolldownOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
vendor: ["wouter", "zustand", "dompurify", "@tanstack/react-virtual"],
|
||||
icons: ["lucide-react"],
|
||||
/*
|
||||
* Rolldown, which vite 8 bundles with, dropped the object form of
|
||||
* `manualChunks` -- naming a chunk and listing the packages in it --
|
||||
* and takes groups matched against module paths instead. Same two
|
||||
* chunks out the other end; `icons` is listed first because groups are
|
||||
* tried in order and the first match wins.
|
||||
*/
|
||||
codeSplitting: {
|
||||
groups: [
|
||||
{ name: "icons", test: /node_modules[\\/]lucide-react[\\/]/ },
|
||||
{
|
||||
name: "vendor",
|
||||
test: /node_modules[\\/](wouter|zustand|dompurify|@tanstack[\\/]react-virtual)[\\/]/,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user