1.1.0 • Published 8 months ago
@nodejs-loaders/json5 v1.1.0
Nodejs Loaders: json5
Environments: dev, test
Compatible APIs: module.register
To import a JSON5 file in Node.js, it must have a .json5
file extension and an import attribute in the import statement (for consistency with Node.js's support for json
imports):
import data from './data.json5' with { type: 'json5' };
// OR
const data = await import('./data.json5', { with: { type: 'json5' } });
{
// JSON5 file example
key: "value",
number: 42,
// Comment line
}
.json5