JSPM

tv4-loader

0.0.3
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 8
    • Score
      100M100P100Q32235F
    • License ISC

    Webpack loader that used tv4 for json validation.

    Package Exports

    • tv4-loader

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tv4-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    tv4-loader

    Webpack loader for validating json files against a schema file. Can be used in combination with json-loader.

    Usage

    module: {
      preLoaders: [
        {
          test: path.join(__dirname, 'some-json-file.json'),
          loader: 'tv4',
          query: {
            schema: path.join(__dirname, 'some-schema.json'),
          }
        }
      ],
      loaders: [
        {
          test: /\.json$/,
          loader: 'json'
        }
      ]
    }

    Query Parameters

    Known Limitations

    • schema needs to be an absolute path to the schema file.

    License

    MIT