Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when using experimental loader flag, issue with longFormatter being exported twice #3769

Open
tomalaforge opened this issue Apr 16, 2024 · 2 comments · May be fixed by #3770
Open

when using experimental loader flag, issue with longFormatter being exported twice #3769

tomalaforge opened this issue Apr 16, 2024 · 2 comments · May be fixed by #3770

Comments

@tomalaforge
Copy link

longFormatter is being exported twice. Inside format file and inside the parse file.

Do we really need to export it twice?

When using the flag --experimental-loader, we have the following issue:

file:///xxx/node_modules/date-fns/index.mjs?iitm=true:1714
    let $longFormatters = $1713274025149ebd0a3f5.longFormatters
        ^

SyntaxError: Identifier '$longFormatters' has already been declared
�[90m    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)�[39m
�[90m    at callTranslator (node:internal/modules/esm/loader:279:14)�[39m
�[90m    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)�[39m

Node.js v21.6.1
@tomalaforge
Copy link
Author

PR #3770

@fturmel
Copy link
Member

fturmel commented Apr 16, 2024

Hmm I agree this is a problem because of the re-exports in the root barrel file.

I wonder if this is contributing to the Parcel tree-shaking issues in #3744 and #3670 as well.

@fturmel fturmel linked a pull request Apr 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants