Edit 2021-04-14 by @arcanis: In case you reach this thread by Twitter, ESM for PnP is on our roadmap. It's tricky due to some primitives currently missing in Node (they're working on this, but as you can see it's still branded as experimental), in the meantime if you need it then the node-modules linker remain a perfectly fine solution. In any case, help is appreciated, Twitter rants less.
What package is covered by this investigations?```
@softvisio/cli
Describe the goal of the investigation
I am trying to run script, that uses es6 syntax.
yarn add @softvisio/cli
yarn softvisio-cli
But get this error:
(node:4268) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
d:\downloads\yarn\@softvisio-cli-npm-0.1.0-efe3491d08-1.zip\node_modules\@softvisio\cli\bin\cli.js:3
import softvisioCliApi from "../lib/api.js";
^^^^^^
I am using node 13 that can load es6 modules directly.
Is it currently possible to use pure es6 modules with yarn 2 or I need to compile them to commonjs before?
Edit 2021-04-14 by @arcanis: In case you reach this thread by Twitter, ESM for PnP is on our roadmap. It's tricky due to some primitives currently missing in Node (they're working on this, but as you can see it's still branded as experimental), in the meantime if you need it then the
node-moduleslinker remain a perfectly fine solution. In any case, help is appreciated, Twitter rants less.What package is covered by this investigations?```
@softvisio/cli
Describe the goal of the investigation
I am trying to run script, that uses es6 syntax.
But get this error:
I am using node 13 that can load es6 modules directly.
Is it currently possible to use pure es6 modules with yarn 2 or I need to compile them to commonjs before?