Open shenggen1987 opened 8 years ago
webpackConfig.module.loaders.forEach(function (loader, index) { if (typeof loader.test === 'function' && loader.test.toString().indexOf('.less$') > -1) { loader.test = /.dont.exist.file/; } if (loader.test.toString() === '/.module.less$/') { loader.test = /.less$/; }
}); 以前都是这样加载的 loaders: [ {test: /.less$/, loader: "style!css!less", exclude: /node_modules|bower_components/}, {test: /.woff(2)$/, loader: "url?limit=10000&minetype=application/font-woff"} ]
webpackConfig.module.loaders.forEach(function (loader, index) { if (typeof loader.test === 'function' && loader.test.toString().indexOf('.less$') > -1) { loader.test = /.dont.exist.file/; } if (loader.test.toString() === '/.module.less$/') { loader.test = /.less$/; }
}); 以前都是这样加载的 loaders: [ {test: /.less$/, loader: "style!css!less", exclude: /node_modules|bower_components/}, {test: /.woff(2)$/, loader: "url?limit=10000&minetype=application/font-woff"} ]