parcel
parcel copied to clipboard
export-default-from proposal is enabled
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.
I'm not entirely sure why, Parcel has the export-default-from proposal enabled: https://github.com/parcel-bundler/parcel/blob/cd447dc4edaa3a6ff6b40fbfd41998656dad3515/packages/transformers/js/core/src/lib.rs#L549 and according to that, what you're seeing is the correct behaviour... https://github.com/tc39/proposal-export-default-from/issues/2
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.