Package Exports
- @nodejs-loaders/jsonc
- @nodejs-loaders/jsonc/jsonc.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nodejs-loaders/jsonc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Nodejs Loaders: jsonc
Environments: dev, test
Compatible APIs: module.register
To import a JSONC file in node, it must have a .jsonc
file extension and an import attribute in the import statement (for consistency with Node.js's support for json
imports):
import data from './data.jsonc' with { type: 'jsonc' };
// OR
const data = await import('./data.jsonc', { with { type: 'jsonc' } });
{
// JSONC file
"key": "value"
/* comment */
}
Supported file extensions
.jsonc