The jsonc-loader
resolves import/require()
on a JSONC(or jsonc) file into legit JSON object.
To begin, you'll need to install jsonc-loader
:
$ npm install jsonc-loader --save-dev
Then add the loader to your webpack
config. For example:
harrypotter.jsonc
webpack.config.js
module.exports = { module: { rules: [ { test: /.jsonc$/, use: [ { loader: `jsonc-loader`, }, ], }, ], }, };
And run webpack
via your preferred method.
Please take a moment to read our contributing guidelines if you haven't yet done so.