@@ -91,55 +91,10 @@ export default {
9191 }
9292 ]
9393 } ,
94- // The notation here is somewhat confusing.
95- // "postcss" loader applies autoprefixer to our CSS.
96- // "css" loader resolves paths in CSS and adds assets as dependencies.
97- // "style" loader normally turns CSS into JS modules injecting <style>,
98- // but unlike in development configuration, we do something different.
99- // `ExtractTextPlugin` first applies the "postcss" and "css" loaders
100- // (second argument), then grabs the result CSS and puts it into a
101- // separate file in our build process. This way we actually ship
102- // a single CSS file in production instead of JS code injecting <style>
103- // tags. If you use code splitting, however, any async bundles will still
104- // use the "style" loader inside the async code so CSS from them won't be
105- // in the main CSS file.
94+ // Process css
10695 {
10796 test : / \. c s s $ / ,
108- loader : isProduction ? ExtractTextPlugin . extract (
109- {
110- fallback : "style-loader" ,
111- use : [
112- {
113- loader : "css-loader" ,
114- options : {
115- importLoaders : 1 ,
116- minimize : true ,
117- sourceMap : isProduction
118- }
119- } ,
120- {
121- loader : "postcss-loader" ,
122- options : {
123- // Necessary for external CSS imports to work
124- // https://github.com/facebookincubator/create-react-app/issues/2677
125- ident : "postcss" ,
126- plugins : ( ) => [
127- require ( "postcss-flexbugs-fixes" ) ,
128- autoprefixer ( {
129- browsers : [
130- ">1%" ,
131- "last 4 versions" ,
132- "Firefox ESR" ,
133- "not ie < 9" // React doesn't support IE8 anyway
134- ] ,
135- flexbox : "no-2009"
136- } )
137- ]
138- }
139- }
140- ]
141- }
142- ) : [
97+ loader : [
14398 require . resolve ( "style-loader" ) ,
14499 {
145100 loader : require . resolve ( "css-loader" ) ,
0 commit comments