-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwebpack.config.dev.js
35 lines (34 loc) · 1 KB
/
webpack.config.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
const {merge} = require('webpack-merge');
const {sassLoader, fileLoader, getDefinitions} = require('./utils');
const config = require('./webpack.config.base');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CleanTerminalPlugin = require('clean-terminal-webpack-plugin');
module.exports = merge(config, {
mode: 'development',
stats: 'minimal',
output: {
publicPath: "/"
},
module: {
rules: [
{
test: /\.(sass|css|scss)$/,
// vue-style-loader doesn't work for webpackdevserver, I'm too lazy to check why, so use style-loader instead
use: ["style-loader", 'css-loader?sourceMap', sassLoader],
},
fileLoader("/")
]
},
devServer: {
disableHostCheck: true, // allow joining under different hostnames to dev server, like ngrok
},
plugins: [
new CleanTerminalPlugin(),
getDefinitions(true),
new HtmlWebpackPlugin({
template: '../src/index.ejs',
favicon: '../src/assets/favicon.ico',
inject: false
})
]
});