Vite Rollup #20805
Unanswered
sudeepthisingi
asked this question in
Q&A
Vite Rollup
#20805
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, we are trying to use manual chunking to optimize our bundles. Below is the sample code. There seems to be either ciruclar dependencies or this error
Uncaught TypeError: Cannot set properties of undefined (setting 'AsyncMode')
. I tried to use the visualize plugin and bundle the dependencies accordingly but nothing seems to be helping. Any help is appreciated.`rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules')) {
if (
/node_modules\//.test(
id,
) ||
/node_modules\//.test(id) ||
/node_modules[\/]@mui/.test(id)
) {
return 'react-emotion-mui-vendor';
}
if (/node_modules[\/]@datadog/.test(id)) {
return 'datadog-vendor';
}
if (/node_modules[\/]exceljs/.test(id)) {
return 'exceljs-vendor';
}
if (/node_modules[\/]@aws-sdk/.test(id)) {
return 'aws-vendor';
}
Beta Was this translation helpful? Give feedback.
All reactions