rollup / rollup-plugin-commonjs

This module has moved and is now available at @rollup/plugin-commonjs / https://github.com/rollup/plugins/blob/master/packages/commonjs
MIT License
501 stars 126 forks source link

Emit error if mixing module syntax exist in same file #412

Closed oMaten closed 4 years ago

oMaten commented 4 years ago

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:

shellscape commented 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.