Skip to content

Commit 4cc9a99

Browse files
committed
fix(webpack.config): override css loader
1 parent bd02fe8 commit 4cc9a99

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

webpack.config.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict';
22

3-
module.exports = require('ng2-webpack-config').webpack.dev({
3+
const _ = require('lodash');
4+
5+
const webpackConfig = require('ng2-webpack-config').webpack.dev({
46
src: 'demo',
57
dist: 'demo-build',
68
htmlIndexes: ['index.html'],
@@ -14,3 +16,16 @@ module.exports = require('ng2-webpack-config').webpack.dev({
1416
alias: {},
1517
baseUrl: '/'
1618
});
19+
20+
const loaders = _.filter(webpackConfig.module.loaders, loader => {
21+
return !loader.test.test('.css');
22+
});
23+
24+
loaders.push({
25+
test: /\.css$/,
26+
loader: 'style-loader!css-loader'
27+
})
28+
29+
webpackConfig.module.loaders = loaders;
30+
31+
module.exports = webpackConfig;

0 commit comments

Comments
 (0)