-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (32 loc) · 1.01 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const { resolve } = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
module.exports = {
devtool: "source-map",
entry: {
furomon: [
"./src/furomon/assets/scripts/furo.js",
"./src/furomon/assets/styles/furo.sass",
],
"furo-extensions": ["./src/furomon/assets/styles/furo-extensions.sass"],
},
output: {
filename: "scripts/[name].js",
path: resolve(__dirname, "src/furomon/theme/furo/static"),
},
plugins: [new MiniCssExtractPlugin({ filename: "styles/[name].css" })],
optimization: { minimizer: [`...`, new CssMinimizerPlugin()] },
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
MiniCssExtractPlugin.loader,
{ loader: "css-loader", options: { sourceMap: true } },
{ loader: "postcss-loader", options: { sourceMap: true } },
{ loader: "sass-loader", options: { sourceMap: true } },
],
},
],
},
};