-
-
Notifications
You must be signed in to change notification settings - Fork 156
/
webpack.common.js
48 lines (47 loc) · 1.1 KB
/
webpack.common.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
41
42
43
44
45
46
47
48
const path = require('path')
const webpack = require("webpack");
const BundleTracker = require("webpack-bundle-tracker");
module.exports = {
entry: {
init: './assets/scripts/init.js',
htmx: {
import: './assets/scripts/htmx.js',
dependOn: 'init'
},
tableify: {
import: './assets/scripts/tableify.js',
dependOn: 'init'
},
receipt_downloads: {
import: './assets/scripts/receipt_downloads.js'
},
font_awesome: {
import: './assets/scripts/font_awesome.js'
},
validate_payment_details: {
import: './assets/scripts/validate_payment_details.js'
}
},
output: {
filename: '[id]-[contenthash].js',
path: path.resolve(__dirname, 'frontend', 'static', 'js', 'c'),
publicPath: "auto",
},
devServer: {
writeToDisk: true
},
// optimization: {
// splitChunks: {
// chunks: 'all',
// minSize: {
// javascript: 900000
// },
// maxSize: {
// javascript: 1000000
// }
// }
// },
plugins: [
new BundleTracker({path: __dirname, filename: "webpack-stats.json"}),
],
}