Created
April 7, 2018 11:02
-
-
Save jarshwah/53fbf5b762d9bb0e1aa7db7424cfc65f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module: { | |
rules: [ | |
// ... | |
// Rules for Style Sheets | |
{ | |
test: /\.(scss|sass)$/, | |
include: [path.resolve(__dirname, 'src'), path.resolve(__dirname, 'assets/scss')], | |
use: extractSass.extract({ | |
use: [ | |
// Process internal/project styles (from assets/scss folder) | |
{ | |
loader: 'css-loader', | |
options: { | |
// CSS Loader https://github.com/webpack/css-loader | |
importLoaders: 1, | |
sourceMap: isDebug, | |
// CSS Modules https://github.com/css-modules/css-modules | |
modules: true, | |
localIdentName: isDebug | |
? '[name]-[local]-[hash:base64:5]' | |
: '[hash:base64:5]', | |
// CSS Nano http://cssnano.co/ | |
minimize: isDebug ? false : minimizeCssOptions, | |
}, | |
}, | |
{ loader: 'postcss-loader', options: { sourceMap: isDebug } }, | |
{ loader: 'sass-loader', options: { sourceMap: isDebug } }, | |
], | |
fallback: 'style-loader', | |
}), | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment