-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
35 lines (34 loc) · 941 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
const resolve = require('path').resolve;
const url = require('url');
const webpack = require('webpack');
const common = require('./webpack.config.js');
const merge = require('webpack-merge');
module.exports = merge(common, {
output: {
publicPath: 'https://localhost:8080/',
},
devServer: {
// contentBase: './dist',
hot: true,
https: true,
hotOnly: true,
proxy: {
'/api': {
target: 'https://127.0.0.1',
changeOrigin: true,
secure: false,
pathRewrite: {
'^/api': ''
}
}
},
// plugins: [
// new webpack.NamedModulesPlugin(),
// new webpack.HotModuleReplacementPlugin()
// ],
historyApiFallback: {
index: url.parse('/assets/').pathname
}
},
devtool: 'inline-source-map',
});