diff options
author | ThibG <thib@sitedethib.com> | 2018-07-17 21:54:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-17 21:54:12 +0200 |
commit | 012ca4c68d785dcf13e4cabd16b09a844e622f6b (patch) | |
tree | 106543bbde5ca7a43920ae13928d9ead0075e88b /config/webpack/loaders/sass.js | |
parent | 8e8491e1dab5e2ed98770710e0a32484de8530b3 (diff) | |
parent | bcf157a1a9597595c61b1cce84bd62f63fcaa90b (diff) |
Merge pull request #578 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/webpack/loaders/sass.js')
-rw-r--r-- | config/webpack/loaders/sass.js | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/config/webpack/loaders/sass.js b/config/webpack/loaders/sass.js index 96ad7abe8..920d5350f 100644 --- a/config/webpack/loaders/sass.js +++ b/config/webpack/loaders/sass.js @@ -1,15 +1,27 @@ -const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const MiniCssExtractPlugin = require('mini-css-extract-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' } }, - { loader: 'postcss-loader', options: { sourceMap: true } }, - 'resolve-url-loader', - { loader: 'sass-loader', options: { includePaths: ['app/javascript'] } }, - ], - }), + test: /\.s?css$/i, + use: [ + MiniCssExtractPlugin.loader, + { + loader: 'css-loader', + options: { + minimize: env.NODE_ENV === 'production', + }, + }, + { + loader: 'postcss-loader', + options: { + sourceMap: true, + }, + }, + { + loader: 'sass-loader', + options: { + includePaths: ['app/javascript'], + }, + }, + ], }; |