Closed d-bardiau closed 2 years ago
I noticed this too, I believe the output code targets esnext which, for most consumers will require further transpilation. This isn't an issue if you transpile node_module, by default, but many people don't since it's discouraged by the Webpack docs. It'd be nice to target ES6 instead to allow for easier consumption.
Thanks for the report! Can you tell me what your node version/environment is? We can easily provide some guidance in the docs for this.
Thanks for your answer. I first tried with node lts/fermium -> v14.18.3 and it lead to the error I reported. After your message I also tried with node lts/gallium -> v16.13.2 and: it works!
Yep, OK, I will clarify in the docs about default node support (and how to mitigate it in older runtimes). Thanks for your support!
Thank you very much!
If you don't mind, I'm going to keep this open to remind myself to test and document the behavior :)
Updated in 'getting started'
Hi everyone,
if I follow the get started guide for node.js the following error gets thrown:
This is what I did:
Trying the same with node index.mjs leads to the same result.