forked from roryg/ghostwriter
-
Notifications
You must be signed in to change notification settings - Fork 154
/
webpack.config.js
41 lines (39 loc) · 926 Bytes
/
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
34
35
36
37
38
39
40
const path = require('path');
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
module.exports = {
entry: {
site: path.join(__dirname, 'static', 'styles', 'site'),
syntax: path.join(__dirname, 'static', 'styles', 'syntax'),
},
resolve: {
modules: [
'node_modules'
],
extensions: ['.scss'],
},
output: {
path: path.join(__dirname, 'static', 'dist'),
},
plugins: [
new RemoveEmptyScriptsPlugin(),
new MiniCssExtractPlugin({
filename: '[name].css'
}),
],
optimization: {
minimize: true,
minimizer: [
new CssMinimizerPlugin(),
],
},
module: {
rules: [
{
test: /\.scss$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
}
]
}
};