You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
I'm using the new ES modules features from Node.js 12 (the next LTS).
If I set my package to be an ESM one with the field type set to module in package.json file, the esm package stops working as expected.
import {spawn} from 'child_process';
^
SyntaxError: Unexpected token {
If I set the type field to commonjs, esm works as expected (but not my code which uses only ES modules).
It would be nice if esm could manage this case (i.e. that the new ESM parser is already enabled).
The text was updated successfully, but these errors were encountered:
I'm using the new ES modules features from Node.js 12 (the next LTS).
If I set my package to be an ESM one with the field
type
set tomodule
inpackage.json
file, theesm
package stops working as expected.If I set the
type
field tocommonjs
,esm
works as expected (but not my code which uses only ES modules).It would be nice if
esm
could manage this case (i.e. that the new ESM parser is already enabled).The text was updated successfully, but these errors were encountered: