Repository navigation
Expand file tree
/
Copy pathwebpack-dev.config.js
More file actions
59 lines (57 loc) · 1.58 KB
/
Copy pathwebpack-dev.config.js
File metadata and controls
59 lines (57 loc) · 1.58 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* @classification UNCLASSIFIED
*
* @module scripts.webpack-dev
*
* @copyright Copyright (C) 2020, Lockheed Martin Corporation
*
* @license Apache-2.0
*
* @owner Donte McDaniel
*
* @author Donte McDaniel
*
* @description The webpack configuration for development automatic recompile.
*/
const webpack = require('webpack');
const path = require('path');
const rootPath = path.join(path.dirname(__dirname).split(path.sep).join('/'));
module.exports = {
mode: 'development',
entry: {
navbar: path.join(rootPath, 'app', 'ui', 'components', 'apps', 'nav-app.jsx'),
'home-app': path.join(rootPath, 'app', 'ui', 'components', 'apps', 'home-app.jsx'),
'org-app': path.join(rootPath, 'app', 'ui', 'components', 'apps', 'org-app.jsx'),
'project-app': path.join(rootPath, 'app', 'ui', 'components', 'apps', 'project-app.jsx'),
'profile-app': path.join(rootPath, 'app', 'ui', 'components', 'apps', 'profile-app.jsx'),
'admin-console-app': path.join(rootPath, 'app', 'ui', 'components', 'apps', 'admin-console-app.jsx')
},
watch: true,
output: {
path: path.join(rootPath, 'build', 'public', 'js'),
filename: '[name].js'
},
devServer: {
historyApiFallback: true
},
module: {
rules: [
{
test: /\.jsx?$/,
loader: ['babel-loader'],
exclude: /node_modules/
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader']
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
]
// devtool: 'source-map'
};