-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Target es6 for esm build #378
Comments
Thanks for pointing this out! I'm ok with changing the target to I think that compatibility concerns with devices/browsers should be left to the end user. Some transpilations of native |
It looks like it's coming from my webpack source-map-loader step:
Maybe |
Note: If I remove the
I get a new but similar error:
EDIT: Please excuse the ".mjs" extension there, I am now experimenting with |
Here is a minimum reproducible sample: https://github.com/canadaduane/pptest To reproduce:
EDIT: Removed typescript dependency from repro. |
I just did a little more testing: Version 6.27.0 is the last working version for me. "Module parse failed" occurs in the sample |
Thanks for the repro 👍 I did some research and found that support for ?? and ?. was added to You should upgrade to |
Thanks! I had forgotten that Webpack is dependent on I believe our project can be updated to Webpack 5, but it will be a few months, so a little more time would be greatly appreciated. |
Description of the bug
Previously, I could use postprocessing in my webpack bundling without any additional processing (e.g. babel). Recently, however, it appears the language target has moved to "esnext" which includes language features such as "??" and "?." which are less compatible. Specifically, the
build/postprocessing.esm.js
generated file includes these esnext features.To Reproduce
Run
pnpm build
and inspect thebuild/postprocessing.esm.js
file to see that it includes??
and?.
operators.Expected behavior
Produce a plain "es6" target.
Library versions used
Potential Solution
The https://github.com/pmndrs/postprocessing/blob/main/esbuild.mjs#L69 instructions do not include
target: "es6"
, but I believe adding this would solve the issue.The text was updated successfully, but these errors were encountered: