File tree 3 files changed +94
-1
lines changed
3 files changed +94
-1
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,44 @@ module.exports = {
220
220
} ,
221
221
] ,
222
222
} ,
223
+ {
224
+ test : / \. s c s s $ / ,
225
+ use : [
226
+ require . resolve ( 'style-loader' ) ,
227
+ {
228
+ loader : require . resolve ( 'css-loader' ) ,
229
+ options : {
230
+ importLoaders : 1 ,
231
+ } ,
232
+ } ,
233
+ {
234
+ loader : require . resolve ( 'postcss-loader' ) ,
235
+ options : {
236
+ // Necessary for external CSS imports to work
237
+ // https://github.com/facebookincubator/create-react-app/issues/2677
238
+ ident : 'postcss' ,
239
+ plugins : ( ) => [
240
+ require ( 'postcss-flexbugs-fixes' ) ,
241
+ autoprefixer ( {
242
+ browsers : [
243
+ '>1%' ,
244
+ 'last 4 versions' ,
245
+ 'Firefox ESR' ,
246
+ 'not ie < 9' , // React doesn't support IE8 anyway
247
+ ] ,
248
+ flexbox : 'no-2009' ,
249
+ } ) ,
250
+ ] ,
251
+ } ,
252
+ } ,
253
+ {
254
+ loader : require . resolve ( 'sass-loader' ) ,
255
+ options : {
256
+ importLoaders : 1 ,
257
+ } ,
258
+ } ,
259
+ ] ,
260
+ } ,
223
261
// "file" loader makes sure those assets get served by WebpackDevServer.
224
262
// When you `import` an asset, you get its (virtual) filename.
225
263
// In production, they would get copied to the `build` folder.
Original file line number Diff line number Diff line change @@ -247,6 +247,59 @@ module.exports = {
247
247
) ,
248
248
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
249
249
} ,
250
+ {
251
+ test : / \. s c s s $ / ,
252
+ loader : ExtractTextPlugin . extract (
253
+ Object . assign (
254
+ {
255
+ fallback : {
256
+ loader : require . resolve ( 'style-loader' ) ,
257
+ options : {
258
+ hmr : false ,
259
+ } ,
260
+ } ,
261
+ use : [
262
+ {
263
+ loader : require . resolve ( 'css-loader' ) ,
264
+ options : {
265
+ importLoaders : 1 ,
266
+ minimize : true ,
267
+ sourceMap : shouldUseSourceMap ,
268
+ } ,
269
+ } ,
270
+ {
271
+ loader : require . resolve ( 'postcss-loader' ) ,
272
+ options : {
273
+ // Necessary for external CSS imports to work
274
+ // https://github.com/facebookincubator/create-react-app/issues/2677
275
+ ident : 'postcss' ,
276
+ plugins : ( ) => [
277
+ require ( 'postcss-flexbugs-fixes' ) ,
278
+ autoprefixer ( {
279
+ browsers : [
280
+ '>1%' ,
281
+ 'last 4 versions' ,
282
+ 'Firefox ESR' ,
283
+ 'not ie < 9' , // React doesn't support IE8 anyway
284
+ ] ,
285
+ flexbox : 'no-2009' ,
286
+ } ) ,
287
+ ] ,
288
+ } ,
289
+ } ,
290
+ {
291
+ loader : require . resolve ( 'sass-loader' ) ,
292
+ options : {
293
+ importLoaders : 1 ,
294
+ } ,
295
+ } ,
296
+ ] ,
297
+ } ,
298
+ extractTextPluginOptions
299
+ )
300
+ ) ,
301
+ // Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
302
+ } ,
250
303
// "file" loader makes sure assets end up in the `build` folder.
251
304
// When you `import` an asset, you get its filename.
252
305
// This loader doesn't use a "test" so it will catch all modules
Original file line number Diff line number Diff line change 36
36
"fs-extra" : " 3.0.1" ,
37
37
"html-webpack-plugin" : " 2.29.0" ,
38
38
"jest" : " 22.4.2" ,
39
+ "node-sass-chokidar" : " ^1.3.3" ,
39
40
"object-assign" : " 4.1.1" ,
40
41
"postcss-flexbugs-fixes" : " 3.2.0" ,
41
42
"postcss-loader" : " 2.0.8" ,
42
43
"promise" : " 8.0.1" ,
43
44
"raf" : " 3.4.0" ,
44
- "source-map-loader" : " ^0.2.1" ,
45
45
"react-dev-utils" : " ^5.0.1" ,
46
46
"resolve" : " 1.6.0" ,
47
+ "sass-loader" : " ^7.1.0" ,
48
+ "source-map-loader" : " ^0.2.1" ,
47
49
"style-loader" : " 0.19.0" ,
48
50
"sw-precache-webpack-plugin" : " 0.11.4" ,
49
51
"ts-jest" : " 22.0.1" ,
You can’t perform that action at this time.
0 commit comments