Add bundling options to put base deps in specific chunks
Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -32,6 +32,26 @@ export default defineConfig({
|
|||||||
plugins: [react(), babel({ plugins: ["relay"] }), tailwindcss()],
|
plugins: [react(), babel({ plugins: ["relay"] }), tailwindcss()],
|
||||||
build: {
|
build: {
|
||||||
assetsDir: "assets",
|
assetsDir: "assets",
|
||||||
|
rolldownOptions: {
|
||||||
|
output: {
|
||||||
|
codeSplitting: {
|
||||||
|
groups: [
|
||||||
|
{
|
||||||
|
name: "react",
|
||||||
|
test: /node_modules\/(?:react-dom|react)\//,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "relay",
|
||||||
|
test: /node_modules\/(?:react-relay|relay-runtime)\//,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "react-router",
|
||||||
|
test: /node_modules\/react-router\//,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
base: "./",
|
base: "./",
|
||||||
server: {
|
server: {
|
||||||
|
|||||||
Reference in New Issue
Block a user