inlineDynamicImports: true
and moduleSideEffects: 'no-treeshake'
causes a hard-to-diagnose error
#4098
Labels
inlineDynamicImports: true
and moduleSideEffects: 'no-treeshake'
causes a hard-to-diagnose error
#4098
Expected Behavior
I can set
inlineDynamicImports: true
, and resolve a module withmoduleSideEffects: 'no-treeshake'
, and have the build complete without an error (in the example, removingmoduleSideEffects
orinlineDynamicImports
both work, and neither changes the output, but my real project requires both to be enabled).Actual Behavior
The following error is thrown:
I tracked this down a little bit, and noticed that we add the offending
undefined
s inrollup/src/utils/getStaticDependencies.ts
Lines 42 to 46 in d73b2ac
chunkByModule.get(dependency) == null
) was always an index file that just re-exports other parts of the module being imported (I used a library from my real example,@remote-ui/core
, but it was not specific to this library in my larger example).Thanks in advance for your help, and for the amazing work on Rollup!
The text was updated successfully, but these errors were encountered: