This is a minimal setup to demonstrate a bug @parcel/library-bundler with export {default as name} from "file"
syntax with ESModules.
- look at
src/__localization__/index.js
- note it should exporten_us
- run
npm run build
- observe
dist/__localization__.hash.js
Expected: file containsen_us
export Observed: file does not export anything.
Note that this does work when you build a cjs module, but our particular requirements in our real project are to build an ESM package, and we cannot rewrite __localization__/index.js
to work around the issue as it is generated by localization automation tools that are outside of our control.