summaryrefslogtreecommitdiff
path: root/sass/webpack.config.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-05-18 08:31:13 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-05-18 08:31:13 +0200
commitc3071d54eb1275e36067f8549a7a7ac2c6876de9 (patch)
tree4669ca1548f7887305cb3ea35aad6b677531000c /sass/webpack.config.js
parent3668c69d1fad5855fd9bcd190855a7f6c6ec2195 (diff)
parent2107c0bbaf9f4b7f66c09eb7d242790145456292 (diff)
Merge branch 'marudor-darkMode'
Diffstat (limited to 'sass/webpack.config.js')
-rw-r--r--sass/webpack.config.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/sass/webpack.config.js b/sass/webpack.config.js
new file mode 100644
index 0000000..9696dbb
--- /dev/null
+++ b/sass/webpack.config.js
@@ -0,0 +1,47 @@
+const MiniCssExtractPlugin = require('mini-css-extract-plugin');
+const path = require('path');
+console.log(path.resolve('../public/static/css/'));
+
+module.exports = {
+ mode: 'production',
+ entry: {
+ light: './src/light/index.scss',
+ dark: './src/dark/index.scss',
+ },
+ output: {
+ path: path.resolve('../public/static/css/'),
+ },
+ plugins: [
+ new MiniCssExtractPlugin({
+ filename: '[name].min.css',
+ chunkFilename: '[id].css',
+ }),
+ ],
+ module: {
+ rules: [
+ {
+ test: /\.s?css$/,
+ use: [
+ MiniCssExtractPlugin.loader,
+ {
+ loader: 'css-loader',
+ options: {
+ importLoaders: 2,
+ },
+ },
+ {
+ loader: 'postcss-loader',
+ options: {
+ ident: 'postcss',
+ plugins: loader => [
+ require('postcss-preset-env')(),
+ require('cssnano')(),
+ ],
+ },
+ },
+ 'sass-loader',
+ ],
+ },
+ ],
+ },
+};