forked from DAVFoundation/missions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
37 lines (35 loc) · 1.14 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
36
37
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',
chunks: ['vendor', 'drone_simulation'],
template: path.resolve(__dirname, 'src/index.html'),
favicon: path.resolve(__dirname, 'src/favicon.ico'),
}),
new HtmlWebpackPlugin({
filename: 'delivery_drones/index.html',
chunks: ['vendor', 'delivery_drones'],
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'),
},
}),
],
});