From 821fc0502594d126d399ffc988a9bd4ee56de63a Mon Sep 17 00:00:00 2001 From: David Atchley Date: Sun, 8 Oct 2017 11:36:11 -0500 Subject: [PATCH] fix: importLoaders for webpack prod to ensure sass gets called for css-module `composes:` expressions --- packages/react-scripts/config/webpack.config.prod.js | 4 ++-- packages/react-scripts/package.json | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 2a38a671130..1b5d89c7513 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -238,7 +238,7 @@ module.exports = { loader: require.resolve("css-loader"), options: { modules: true, - importLoaders: 1, + importLoaders: 3, minimize: true, sourceMap: shouldUseSourceMap, localIdentName: "[name]__[local]__[hash:base64:5]" @@ -362,7 +362,7 @@ module.exports = { { loader: require.resolve("css-loader"), options: { - importLoaders: 1, + importLoaders: 3, minimize: true, sourceMap: shouldUseSourceMap } diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 8bf96f25d44..67e67d6c99c 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -1,7 +1,8 @@ { "name": "@tandem.ly/react-scripts", "version": "1.0.18", - "description": "Tandem.ly Custom Configuration and scripts for Create React App.", + "description": + "Tandem.ly Custom Configuration and scripts for Create React App.", "repository": "Tandemly/create-react-app", "license": "MIT", "engines": { @@ -10,13 +11,7 @@ "bugs": { "url": "https://github.com/Tandemly/create-react-app/issues" }, - "files": [ - "bin", - "config", - "scripts", - "template", - "utils" - ], + "files": ["bin", "config", "scripts", "template", "utils"], "bin": { "react-scripts": "./bin/react-scripts.js" },