about summary refs log tree commit diff
path: root/config/webpack/rules/css.js
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-03-21 15:35:55 -0700
committerReverite <github@reverite.sh>2019-03-21 15:35:55 -0700
commit592735fd80acd0aeffb5a5674255ed48d7a8db0b (patch)
tree0eefc67f624a07df0af860edecd68d5dc64c7ee9 /config/webpack/rules/css.js
parent75eeb003b09c53d3b4e98046d1c20b0ad8a887bb (diff)
parentbde9196b70299405ebe9b16500b7a3f65539b2c3 (diff)
Merge remote-tracking branch 'glitch/master' into production
Diffstat (limited to 'config/webpack/rules/css.js')
-rw-r--r--config/webpack/rules/css.js31
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,
+      },
+    },
+  ],
+};