Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Throws:
- Error: WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- - configuration.module.rules should be an array:
- [object { enforce?, exclude?, include?, issuer?, loader?, loaders?, oneOf?, options?, parser?, query?, resource?, resourceQuery?, compiler?, rules?, test?, use? }]
- -> Options affecting the normal modules (`NormalModuleFactory`).
- */
- export default (config, env, helpers, options) => {
- let loaders = JSON.parse(JSON.stringify(helpers.getLoaders(config)));
- let lastLoader = loaders.pop();
- loaders.push(lastLoader);
- config.module.rules = loaders.push(
- {
- test: /\.(png|woff|woff2|eot|ttf|otf|svg)$/,
- ruleIndex: lastLoader.ruleIndex+1,
- loaderIndex: lastLoader.loaderIndex+1,
- loader: 'url-loader?limit=100000'
- }
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement