-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
28 lines (27 loc) · 1007 Bytes
/
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
const merge = require('webpack-merge');
const webpack = require('webpack');
const baseWebpackConfig = require('./webpack.config.base');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = merge(baseWebpackConfig, {
mode: 'development',
devtool: 'eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('development'),
API_HOST: JSON.stringify('http://localhost:3000/api'),
WS_ADDRESS: JSON.stringify('ws://localhost:3000'),
}
}),
// new BundleAnalyzerPlugin()
],
devServer: {
port: 8082,
historyApiFallback: true,
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
}
}
});