Transpile nullish operator using webpack bundler #2822
Unanswered
jugglingcats
asked this question in
Troubleshooting
Replies: 2 comments 3 replies
-
I removed Is it right that this plugin will introduce this operator by default? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Possibly related to: #2810 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my project build output, some of the output Javascript files are using the new nullish operator
??
and this is breaking on older browsers. Is there a way to configure snowpack/webpack/babel to transpile for older browser?My project is Typescript but the operator appears to be coming from included node modules such as d3 (and one or two others).
I've installed and added
@babel/plugin-proposal-nullish-coalescing-operator
to mybabel.config.json
but it didn't make any obvious difference.Plugins in
snowpack.config.js
It's interesting that the libs such as d3.js do not contain the nullish operator when running using
snowpack dev
, so it is being introduced during the bundling phase.Any help much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions