-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwebpack.web.config.js
38 lines (36 loc) · 1003 Bytes
/
webpack.web.config.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
const path = require("path")
const WebpackPwaManifest = require("webpack-pwa-manifest")
const { productName, description } = require("./package.json")
const configure = require("./webpack.base.config")
module.exports = (env, argv) => {
return configure({
name: "web",
entries: ["core-js/stable", "regenerator-runtime/runtime"],
targets: "last 1 version",
overrides: {
resolve: {
alias: {
electron: "electron-shim",
},
},
output: {
path: path.resolve(__dirname, "dist/web"),
},
plugins: [
new WebpackPwaManifest({
name: productName,
short_name: productName,
description,
background_color: "#343a40",
icons: [
{
src: path.resolve(__dirname, "build/icon.png"),
sizes: [96, 128, 192, 256, 384, 512],
},
],
}),
],
},
isDevelopment: process.env.WEBPACK_DEV_SERVER === "true",
})
}