-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.dev.js
35 lines (34 loc) · 1.07 KB
/
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
const path = require('path');
const fs = require('fs');
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
static: './dist',
port: 3000,
server: {
type: 'https',
options: {
key: fs.readFileSync(path.join(__dirname, './powershell/domains-certificate-key.pem')),
cert: fs.readFileSync(path.join(__dirname, './powershell/domains-certificate.pem')),
ca: fs.readFileSync(path.join(__dirname, './powershell/server.pem'))
},
},
hot: true,
historyApiFallback: true,
compress: true,
client: {
overlay: true,
},
},
output: {
filename: 'js/[name].[contenthash].js',
path: path.resolve(__dirname, 'dist'),
chunkFilename: 'js/[name].[chunkhash].js',
clean: true,
publicPath: '/',
assetModuleFilename: 'images/[hash][ext][query]'
},
});