1.1.0 • Published 11 months ago
@nodejs-loaders/jsonc v1.1.0
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 */
}.jsonc