angular - how to include only selected node_module files in webpack 1.13 files-loader(json-loader) ? -
i using webpack 1.13.2. want load json files selected node_module using json-loader.
it should ignore json files remaining node modules.so have written following configuration in webpack.
module: { loaders: [{ test: /\.json$/, exclude: /node_modules, include: [path.resolve(__dirname,"node_modules/ajv/lib")], loader: 'json-loader' }] } in above code have excluded node_modules loading json files , including specific node module path load json files.
expected behavior load json file folder node_modules/ajv/lib not.it throws error not able load json file.
if comment exclude , works fine loads json files other node modules well.
how can load json files node_modules/ajv/lib ?
Comments
Post a Comment