You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project is great, and I want to thank you first.
I'm working on a performance-focused project, and I want to chunk and separate route-based packages.
vendor: {
test: /[\\/]node_modules[\\/]/,
enforce: true,
chunks: 'all',
name(module: any) {
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
switch (packageName) {
case 'react':
case 'react-dom':
case 'scheduler':
case 'object-assign':
return 'react';
case 'path-to-regexp':
case 'uuid':
return 'rarely';
default:
return 'vendor';
}
},
},
I want to separate them like the structure here, such as homeVendor, usersVendor, etc., and load only that vendor on the relevant page. Separating them is not a problem, but how can I decide which vendor to load on which route? Is it possible to do something like this?
The text was updated successfully, but these errors were encountered:
ahmetkuslular
changed the title
QUESTION: route based package chunking
QUESTION: route based package vendor
Oct 18, 2023
ahmetkuslular
changed the title
QUESTION: route based package vendor
QUESTION: route based package chunking
Oct 18, 2023
You have to understand, that there is no way back if you'll start to work with code splitting in a such way) I mean such manual control.
how can I decide which vendor to load on which route
In my opinion, it's better to delegate this job to webpack or something. Cause it's highly possible, that you can break something or forget to load something important in such manual way.
hi,
The project is great, and I want to thank you first.
I'm working on a performance-focused project, and I want to chunk and separate route-based packages.
I want to separate them like the structure here, such as homeVendor, usersVendor, etc., and load only that vendor on the relevant page. Separating them is not a problem, but how can I decide which vendor to load on which route? Is it possible to do something like this?
The text was updated successfully, but these errors were encountered: