-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.dev.js
45 lines (44 loc) · 1010 Bytes
/
webpack.dev.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
41
42
43
44
45
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
module.exports = {
mode: 'development',
entry: {
main: ['./src/resume.html', './src/styles/index.scss']
},
devServer: {
contentBase: ['./src'],
watchContentBase: true,
open: true,
port: 1985
},
module: {
rules: [
{
test: /\.html$/,
loader: 'html-loader',
options: {
interpolate: true
}
},
{
test: /\.scss$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader']
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
loader: 'file-loader'
}
]
},
plugins: [
new RemoveEmptyScriptsPlugin(),
new MiniCssExtractPlugin(),
new HtmlWebpackPlugin({
template: './src/resume.html',
minify: {
collapseWhitespace: true
}
})
]
};