index.js [serviceWorker]
import * as serviceWorker from './serviceWorker';
serviceWorker.register ();
webpack.config.js
{
test: sassRegex,
exclude: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
},
'sass-loader'
),
sideEffects: true,
},
해당부분 아래와 같이 변경.
{
test: sassRegex,
exclude: sassModuleRegex,
use: getStyleLoaders({
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap
}).concat({
loader: require.resolve('sass-loader'),
options: {
includePaths: [paths.appSrc + '/styles'],
sourceMap: isEnvProduction && shouldUseSourceMap
}
}),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true
},
'프로그래밍언어 > React' 카테고리의 다른 글
React 주석 (0) | 2019.07.20 |
---|---|
React css사용방법 (0) | 2019.07.20 |
React if문 (0) | 2019.07.20 |
React App.js (0) | 2019.07.20 |
React 초기 셋팅 (0) | 2019.06.27 |