dora-js / dora-plugin-webpack

13 stars 11 forks source link

webpackConfig.module.loaders 加载font-woff怎么使用?? #27

Open shenggen1987 opened 8 years ago

shenggen1987 commented 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"} ]