-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat: support disabling preserveDynamicImports
#322
Conversation
Thanks for this pull request. But since this is mostly an edge-case for legacy environments not supporting dynamic imports (not sure which not version) would it makes sense that we document it as how to configure rollup via hooks? |
Well, to be honest, I don't know which is the right way to go. But, I understood that other options follow the same, like: Lines 48 to 49 in 1d06a26
Do you think that this option differs too much from others? |
Other options are often to "opt-in" into a behavior while this one is an "opt-out" for an expected behavior. I am not against introducing an option to make unbuild customizable only questioning if this is really something we expect to be normally used. Update: Let's have it! I have renamed option name slightly to reflect that it always changes behavior.
Do you have more information of this? What library supports legacy node without dynamic import support? |
preserveDynamicImports
Sorry for the late. But I was using this library to build a team lib that is currently using material-ui 4. |
β Type of change
π Description
This PR adds support to choose to turn off "preserve dynamic imports" to older environments.
Issue found using unbuild to build a dependency of create-react-app v4 project where it's doesn't support esm import
π Checklist