🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@nodejs-loaders/jsonc

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodejs-loaders/jsonc

Extend node to support JSONC via customization hooks.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
2
Created
Source

Nodejs Loaders: jsonc

@node.js loaders logo

npm version unpacked size compatible node version(s)

Usage

$ npm i -D @nodejs-loaders/jsonc
$ node --import @nodejs-loaders/jsonc main.js

See README.md in the repository's root for more details.

Environments: dev, test

Compatible APIs:

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

Keywords

customization hooks

FAQs

Package last updated on 08 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts