Webpack loader that resolves internal and external JSON Schema references ($ref) using json-schema-ref-parser. Version 1.0.0 is the first stable release. Supports both JSON and YAML schemas. Part of the Cloudflare doca suite. Provides options like useSource to enable chaining with other loaders. Useful for any webpack project that needs to resolve JSON Schema references at build time.
npm install json-schema-loaderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure webpack to use json-schema-loader for all JSON files except node_modules, and then import a resolved schema in a module.
Set options.useSource=true to pass the raw source to json-schema-ref-parser instead of the file path.
Prefer configuring the loader in webpack.config.js rather than using inline loader syntax.
Ensure the test pattern only matches relevant schema files, or use exclude patterns to avoid non-schema JSON files.
Set options.useSource=true so the loader processes the raw source before other loaders.
Run npm install json-schema-loader --save-dev.
Configure the loader in webpack.config.js instead of using inline syntax.