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
In a project which uses @parcel/bundler-library, any statements that assign names to default exports (e.g. in a barrel file) such as export { default as some_name } from "./some_file", are missing from the bundle output.
The issue is our localization infra generates and commits this file in CI, and we don't own that infra, so actually applying this workaround is basically impossible short of a prebuild script that uses sed or something.
I believe this is not a duplicate of #7622
🐛 bug report
In a project which uses
@parcel/bundler-library
, any statements that assign names to default exports (e.g. in a barrel file) such asexport { default as some_name } from "./some_file"
, are missing from the bundle output.🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
Exported symbols should be exported in the bundle
😯 Current Behavior
Exported symbols are missing from the bundle. This is the entire file that is written to
dist
in the sample repo (linked below)🔦 Context
We have an automated localization system which writes strings to JSON files, and writes a barrel file that looks like
We need these exports to make it into our final bundle.
I've found the following workaround does work
The issue is our localization infra generates and commits this file in CI, and we don't own that infra, so actually applying this workaround is basically impossible short of a prebuild script that uses
sed
or something.💻 Code Sample
This repo is a minimal reproduction of the issue https://github.com/chuckdries/parcel-export-default-as-bug/
🌍 Your Environment
The text was updated successfully, but these errors were encountered: