You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have CJS dependencies that destructure required modules:
const{foo: bar}=require('some-dep')// use `bar`
These work as expected when using the dev server started by parcel ./path/to/index.html but if I run the js created by parcel build ./path/to/index.html it fails in the browser with errors similar to bar is not defined.
🐛 bug report
I have CJS dependencies that destructure required modules:
These work as expected when using the dev server started by
parcel ./path/to/index.html
but if I run the js created byparcel build ./path/to/index.html
it fails in the browser with errors similar tobar is not defined
.🎛 Configuration (.babelrc, package.json, cli command)
No config, only the defaults.
🤔 Expected Behavior
The code should be the same when created by the dev server or the bundle command.
😯 Current Behavior
See above.
💁 Possible Solution
🤷♂️
🔦 Context
Trying to build an app
💻 Code Sample
See above.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: