Closed oMaten closed 4 years ago
Thanks for opening this PR and your work on it. We like the idea, but the implementation needs a little bit more polish. Being that this would be a breaking change, and that we're getting ready to move this plugin to a new repo at https://github.com/rollup/plugins very soon, we have to defer this PR for now. Once the plugin is moved, please do raise an issue in the new repo, pointing back to this PR, and we'll make sure that it gets the attention it deserves.
When i bundle the modules in
iife
type, the plugin will skip transforming CommonJS syntax if current file has found ESM syntax.I think that will be the better choice if the plugin provides the option for throwing error in such case.
The changes as follow:
Check the ESM and CommonJS both if
option.noMixingModuleSyntax
is trueThrow error message if ESM and CommonJS syntax exist in same file