-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.client.js
More file actions
44 lines (42 loc) · 941 Bytes
/
webpack.config.client.js
File metadata and controls
44 lines (42 loc) · 941 Bytes
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
const webpack = require('webpack')
const path = require('path')
const CURRENT_WORKING_DIRECTORY = process.cwd()
const config = {
name: "browser",
mode: "development",
devtool: "eval-source-map",
entry: [
'webpack-hot-middleware/client?reload=true',
path.join(CURRENT_WORKING_DIRECTORY, 'main.js')
],
output: {
path: path.join(CURRENT_WORKING_DIRECTORY, '/dist'),
filename: 'bundle.js',
publicPath: '/dist/'
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: ['babel-loader']
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
resolve: {
alias: {
'dswarm': 'dswarm-web',
'fs': 'graceful-fs',
'react-dom': '@hot-loader/react-dom',
'util': './node_modules/util/util.js'
}
},
experiments: {
topLevelAwait: true
}
}
module.exports = config