UNPKG

@easy-webpack/config-json

Version:

Easy Webpack configuration function for json

18 lines 648 B
"use strict"; var core_1 = require('@easy-webpack/core'); var path = require('path'); module.exports = function json(_a) { var _b = (_a === void 0 ? {} : _a).exclude, exclude = _b === void 0 ? null : _b; return function json() { return { module: { rules: core_1.get(this, 'module.rules', []).concat([{ test: /\.json$/i, loader: 'json-loader', exclude: exclude || (this.metadata.root ? [path.join(this.metadata.root, 'node_modules')] : []), }]) } }; }; }; //# sourceMappingURL=index.js.map