diff options
Diffstat (limited to 'config/webpack/rules/css.js')
-rw-r--r-- | config/webpack/rules/css.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/config/webpack/rules/css.js b/config/webpack/rules/css.js new file mode 100644 index 000000000..9553cb55b --- /dev/null +++ b/config/webpack/rules/css.js @@ -0,0 +1,31 @@ +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); + +module.exports = { + test: /\.s?css$/i, + use: [ + MiniCssExtractPlugin.loader, + { + loader: 'css-loader', + options: { + sourceMap: true, + importLoaders: 2, + localIdentName: '[name]__[local]___[hash:base64:5]', + }, + }, + { + loader: 'postcss-loader', + options: { + sourceMap: true, + }, + }, + { + loader: 'sass-loader', + options: { + includePaths: ['app/javascript'], + fiber: require('fibers'), + implementation: require('sass'), + sourceMap: true, + }, + }, + ], +}; |