diff options
Diffstat (limited to 'config/webpack/loaders/sass.js')
-rw-r--r-- | config/webpack/loaders/sass.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/config/webpack/loaders/sass.js b/config/webpack/loaders/sass.js new file mode 100644 index 000000000..2cb0e759a --- /dev/null +++ b/config/webpack/loaders/sass.js @@ -0,0 +1,14 @@ +const ExtractTextPlugin = require('extract-text-webpack-plugin') +const { env } = require('../configuration.js') + +module.exports = { + test: /\.(scss|sass|css)$/i, + use: ExtractTextPlugin.extract({ + fallback: 'style-loader', + use: [ + { loader: 'css-loader', options: { minimize: env.NODE_ENV === 'production' } }, + 'postcss-loader', + 'sass-loader' + ] + }) +} |