forked from DAVFoundation/missions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
30 lines (28 loc) · 877 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
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const getCommon = require('./webpack.common.js');
const HtmlWebpackPlugin = require('html-webpack-plugin');
process.env.NODE_ENV = 'development';
module.exports = merge(getCommon(process.env.NODE_ENV), {
devtool: 'eval-source-map',
devServer: {
inline: true,
contentBase: path.resolve(__dirname, 'src'),
port: 3333,
historyApiFallback: true
},
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, 'src/index.html'),
favicon: path.resolve(__dirname, 'src/favicon.ico')
}),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'MISSION_CONTROL_HOST': JSON.stringify('http://localhost:8888')
}
})
]
});