-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.web.dev.js
40 lines (38 loc) · 1.05 KB
/
webpack.web.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
38
39
40
/**
* Webpack configuration for handling the application's source code
* in development mode (standard)
*/
const webpack = require('webpack');
const path = require('path');
const sharedConfig = require('./webpack.web.shared');
const config = require('config');
const express = require('express');
module.exports = {
node: sharedConfig.node,
module: sharedConfig.module,
entry: path.join(__dirname, 'app/src/main'),
mode: 'development',
output: {
path: path.join(__dirname, 'app/build'),
publicPath: 'build/',
filename: 'bundle.js'
},
devServer: {
filename: 'bundle.js',
contentBase: path.join(__dirname, 'app/'),
historyApiFallback: true,
port: 9000,
index: path.join(__dirname, 'app/index.html'),
before: (app) => {
app.use('build', express.static(path.join(__dirname, 'app/build')));
}
},
plugins: sharedConfig.plugins.concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('development')
},
'OVIDE_CONFIG': JSON.stringify(config)
})
]),
};