7 ms·
FWIW, that's not an `npm` vs `yarn` thing. That's a "Node has only recently added support for ES module syntax and it's still mostly experimental" thing: - ht
by acemarke 6y ago
FWIW, that's not an `npm` vs `yarn` thing. That's a "Node has only recently added support for ES module syntax and it's still mostly experimental" thing:
- https://nodejs.org/api/esm.html https://nodejs.org/api/esm.html
- https://nodejs.medium.com/node-js-version-14-available-now-8170d384567e https://nodejs.medium.com/node-js-version-14-available-now-8...
- josephg 6y agoIts supported pretty well now but you need to explicitly switch ES module support on in nodejs. The easiest way is via the "type": "module" flag in the package.json file for your project.