profile
viewpoint

Ask questionsJSON modules are being reverted on web

See https://github.com/whatwg/html/pull/4943, it appears this is due to lack of consensus between browsers based on a security concern. It does not seem to imply that they won't be implemented in future.

Given that we have erred on the side of web compatibility so far in the implementation, I would like to suggest we bring back the --experimental-json-modules flag for Node.js as we unflag modules to indicate the stability of the feature.

For example, were JSON modules to reland but with slightly different semantics (eg import json from './file.json' as json has been proposed or similar), then that keeps the door open for Node.js to be able to share in any new semantics.

nodejs/modules

Answer questions Fishrock123

As far as I am aware, there is no precedent for re-experimental-flagging a feature. That may be Semver-Major.

useful!

Related questions

Transition Path Problems For Tooling hot 1
Proposal: Support loading package by own "name" hot 1
Out-of-Band Meeting Proposal hot 1
node v13.0-v13.1 errors on require of a module with "exports" defined hot 1
Use consistent error codes for MODULE_NOT_FOUND hot 1
Out-of-Band Meeting Proposal hot 1
Loader Hooks hot 1
Proposal: Support loading package by own "name" hot 1
Github User Rank List