@nodejs-loaders/jsonc
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Nodejs Loaders: jsonc

@node.js loaders logo

npm version unpacked size

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

/@nodejs-loaders/jsonc/

    Package Sidebar

    Install

    npm i @nodejs-loaders/jsonc

    Weekly Downloads

    6

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    4.58 kB

    Total Files

    8

    Last publish

    Collaborators

    • jakobjingleheimer
    • augustinmauroy