Add a production release build.
This commit is contained in:
parent
e881102ade
commit
d5020d3f24
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
|
/dist/
|
||||||
|
3
package-lock.json
generated
3
package-lock.json
generated
@ -28,7 +28,8 @@
|
|||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"webpack": "^5.89.0",
|
"webpack": "^5.89.0",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4",
|
||||||
"webpack-dev-server": "^4.15.1"
|
"webpack-dev-server": "^4.15.1",
|
||||||
|
"webpack-merge": "^5.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.jsx",
|
"main": "index.jsx",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack server",
|
"dev": "webpack server --config webpack.dev.js",
|
||||||
"format": "prettier --write '**/*.{json,js,ts,tsx,css}'"
|
"format": "prettier --write '**/*.{json,js,ts,tsx,css}'",
|
||||||
|
"build": "webpack --config webpack.dev.js",
|
||||||
|
"release": "webpack --config webpack.prd.js"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
@ -30,6 +32,7 @@
|
|||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"webpack": "^5.89.0",
|
"webpack": "^5.89.0",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4",
|
||||||
"webpack-dev-server": "^4.15.1"
|
"webpack-dev-server": "^4.15.1",
|
||||||
|
"webpack-merge": "^5.10.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,8 +75,6 @@ module.exports = {
|
|||||||
filename: "index.html",
|
filename: "index.html",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
mode: "development",
|
|
||||||
devtool: "inline-source-map",
|
|
||||||
experiments: {
|
experiments: {
|
||||||
asyncWebAssembly: true,
|
asyncWebAssembly: true,
|
||||||
},
|
},
|
7
webpack.dev.js
Normal file
7
webpack.dev.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
const { merge } = require("webpack-merge");
|
||||||
|
const common = require("./webpack.common.js");
|
||||||
|
|
||||||
|
module.exports = merge(common, {
|
||||||
|
mode: "development",
|
||||||
|
devtool: "inline-source-map",
|
||||||
|
});
|
6
webpack.prd.js
Normal file
6
webpack.prd.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
const { merge } = require("webpack-merge");
|
||||||
|
const common = require("./webpack.common.js");
|
||||||
|
|
||||||
|
module.exports = merge(common, {
|
||||||
|
mode: "production",
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user