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

Preserve some require statements #174

Closed
Rich-Harris opened this issue Mar 7, 2017 · 0 comments · Fixed by #175
Closed

Preserve some require statements #174

Rich-Harris opened this issue Mar 7, 2017 · 0 comments · Fixed by #175

Comments

@Rich-Harris
Copy link
Contributor

Occasionally it's necessary to keep a particular require statement so that it executes at runtime rather than being converted into an import. It's almost always a bad sign, but sometimes it's unavoidable.

Solution: allow IDs to be excluded from the transformation, and when that option is used, don't rewrite require as commonjsHelpers.commonjsRequire (which throws)

Rich-Harris added a commit that referenced this issue Mar 7, 2017
allow require statements to pass through unmolested
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 a pull request may close this issue.

1 participant