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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcel strips core-js import #8282

Open
danieltroger opened this issue Jul 5, 2022 · 2 comments
Open

Parcel strips core-js import #8282

danieltroger opened this issue Jul 5, 2022 · 2 comments

Comments

@danieltroger
Copy link
Contributor

馃悰 bug report

When importing certain features from core-js like a polyfill for String.prototype.at, nothing is included in the output bundle.

馃帥 Configuration (.babelrc, package.json, cli command)

Please see attached .zip file with reproduction

馃 Expected Behavior

The imported file is bundled and the polyfill included

馃槸 Current Behavior

An empty file is emitted

馃拋 Possible Solution

Don't ignore the side-effects or what's happening and properly bundle the file

馃敠 Context

Needed String.prototype.at support but failed in including a polyfill for it

馃捇 Code Sample

import "core-js/modules/es.string.at-alternative";

Please see example reproduction:

parcel_repro.zip

馃實 Your Environment

Software Version(s)
Parcel 2.0.0-nightly.1133+99cf50510
Node v18.1.0
npm/Yarn 3.2.1
Operating System macOS 12.2 (21D49)
@mischnic
Copy link
Member

mischnic commented Jul 6, 2022

-> swc-project/swc#5126

@github-actions github-actions bot added the Stale Inactive issues label Jan 3, 2023
@danieltroger
Copy link
Contributor Author

I still think it should work to import from my installed core-js without specifying it in a config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants