-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.mjs
45 lines (43 loc) · 1.08 KB
/
webpack.config.mjs
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
import path, { dirname } from 'path'
import { fileURLToPath } from 'url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
export default {
resolve: {
fallback: {
os: false,
path: false,
fs: false,
vm: false,
zlib: false,
http: false,
https: false,
tls: false,
net: false,
stream: false,
crypto: false
}
},
entry: {
map: '/src/assets/js/map.js',
application: '/src/assets/js/application.js',
statusPage: '/src/assets/js/statusPage.js',
'step-by-step-nav': '/src/assets/js/step-by-step-nav.js',
'list-filter': '/src/assets/js/list-filter.js',
'cookie-banner': '/src/assets/js/components/cookie-banner.js'
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'public/js')
},
mode: 'development',
devServer: {
static: {
directory: path.join(__dirname, '/')
},
compress: true,
port: 9000,
open: true, // open the browser after server had been started
hot: true // enable HMR on the server
}
}