File tree Expand file tree Collapse file tree 4 files changed +24
-13
lines changed Expand file tree Collapse file tree 4 files changed +24
-13
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ _.cssLoader = config.cssModules ?
1313 'css-loader?-autoprefixer&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]' :
1414 'css-loader?-autoprefixer'
1515
16+ _ . cssProcessors = [
17+ { loader : 'sass-loader?sourceMap' , test : / \. s c s s $ / } ,
18+ { loader : 'less-loader?sourceMap' , test : / \. l e s s $ / } ,
19+ { loader : 'stylus-loader?sourceMap' , test : / \. s t y l $ / } ,
20+ { loader : 'sass-loader?indentedSyntax&sourceMap' , test : / \. s a s s $ / } ,
21+ ]
22+
1623_ . outputPath = config . electron ?
1724 path . join ( __dirname , '../app/dist' ) :
1825 path . join ( __dirname , '../dist' )
Original file line number Diff line number Diff line change @@ -16,12 +16,14 @@ base.plugins.push(
1616 new FriendlyErrors ( )
1717)
1818
19- // push loader for .css file
20- base . module . loaders . push (
21- {
22- test : / \. c s s $ / ,
23- loaders : [ 'style-loader' , _ . cssLoader , 'postcss-loader' ]
24- }
25- )
19+ // push loader for css files
20+ _ . cssProcessors . forEach ( processor => {
21+ base . module . loaders . push (
22+ {
23+ test : processor . test ,
24+ loaders : [ 'style-loader' , _ . cssLoader , processor . loader ]
25+ }
26+ )
27+ } )
2628
2729module . exports = base
Original file line number Diff line number Diff line change @@ -47,12 +47,14 @@ base.plugins.push(
4747 } )
4848)
4949
50- // extract css in standalone .css files
51- base . module . loaders . push ( {
52- test : / \. c s s $ / ,
53- loader : ExtractTextPlugin . extract ( {
54- loader : [ _ . cssLoader , 'postcss-loader' ] ,
55- fallbackLoader : 'style-loader'
50+ // extract css in standalone css files
51+ _ . cssProcessors . forEach ( processor => {
52+ base . module . loaders . push ( {
53+ test : processor . test ,
54+ loader : ExtractTextPlugin . extract ( {
55+ loader : [ _ . cssLoader , processor . loader ] ,
56+ fallbackLoader : 'style-loader'
57+ } )
5658 } )
5759} )
5860
You can’t perform that action at this time.
0 commit comments