Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Handle options.external correctly#212

Merged
Rich-Harris merged 6 commits intomasterfrom
external-from-commonjs
Aug 3, 2017
Merged

Handle options.external correctly#212
Rich-Harris merged 6 commits intomasterfrom
external-from-commonjs

Conversation

@Rich-Harris
Copy link
Contributor

This fixes an issue demonstrated here, wherein a transformed CommonJS module that required foo would result in foo getting bundled even if it was marked as external with external: ['foo'].

Unfortunately, we have to achieve this by duplicating some of Rollup's core logic. It might be nice if Rollup exposed certain stuff so that we didn't need to do that. In this case that might mean a this.isExternal(id) method, rather than us having to recreate isExternal. (This plugin also needs to duplicate resolution logic, but I'm not sure how we could expose that from Rollup in a sane way in this situation.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant