Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 719 Bytes

File metadata and controls

27 lines (18 loc) · 719 Bytes

Feature: JSON modules

Example A

npm run example-a

The start npm run script passes the --experimental-json-modules flag to node.

For versions of Node.js < v17.5.0 you need to use the --experimental-json-modules flag to use JSON imports in ES modules. If you want to try JSON imports with the import assertion syntax in Node.js v16 you'll need to be running >= v16.14.0 and pass the experimental flag.

Related links