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

export-default-from proposal is enabled #9473

Open
char0n opened this issue Jan 8, 2024 · 2 comments
Open

export-default-from proposal is enabled #9473

char0n opened this issue Jan 8, 2024 · 2 comments

Comments

@char0n
Copy link

char0n commented Jan 8, 2024

Here is an example:

const from = 3;
export default from;

@parcel/transformer-js: Unexpected token ;. Expected a string literal


The code uses reserved keyword from, but in this context it's completely valid JavaScript.

@mischnic
Copy link
Member

mischnic commented Jan 8, 2024

I'm not entirely sure why, Parcel has the export-default-from proposal enabled:

export_default_from: true,

and according to that, what you're seeing is the correct behaviour...
tc39/proposal-export-default-from#2

@char0n
Copy link
Author

char0n commented Jan 9, 2024

Hi @mischnic,

Ahh, interesting that parcel is implementing Stage 1 proposals. Anyway it's clear now why it happens. Thanks! I've adopted naming changes withing the code to void situation however the proposal endup.

@mischnic mischnic changed the title Certain syntax breaks parcel export-default-from proposal is enabled Jan 9, 2024
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