-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade from 0.30.0 to 0.31.1 breaks dynamic import #793
Comments
The same issue with [email protected] caused a bug in my tool create-eth-app. I'm loading a file called The copy operation depends upon an if block, so I take it that ncc doesn't bundle the Here's the distributable for [email protected] (before upgrading ncc), and the distributable for [email protected] (after upgrading ncc). How can we bring the old behavior back? Update: I managed to get away by using the copyfiles package, which I run after the ncc part in my build script. But this is rather verbose and doesn't scale. It would still be good to have NCC bundle the dynamically imported files. |
If you have multiple |
For my project, I have moved my import to statically analyzable import, which allowed ncc to find and bundle the modules:
A quick write up: https://dev.to/louisgv/typescript-dynamic-module-import-2dln |
I do have multiple tsconfig.json in my monorepo but the bundle only run under one leaf config (that extend root config) |
I have some express route that I'm dynamically importing using the snippet below:
[email protected] worked, the dist contains multiple index.js files (18.index.js, 276.index.js, etc...), which I assumed was ncc splitting the bundles.
[email protected] didn't work. It produces a single index.js file, and upon running it throws this error:
I wonder if the change to how tsconfig is further leveraged on the bundling process has anything to do with this :-?...
The text was updated successfully, but these errors were encountered: