Add a production release build.

This commit is contained in:
Tom Alexander 2024-01-27 23:18:42 -05:00
parent e881102ade
commit d5020d3f24
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
6 changed files with 22 additions and 6 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/node_modules/
/dist/

3
package-lock.json generated
View File

@ -28,7 +28,8 @@
"typescript": "^5.3.3",
"webpack": "^5.89.0",
"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": {

View File

@ -4,8 +4,10 @@
"description": "",
"main": "index.jsx",
"scripts": {
"dev": "webpack server",
"format": "prettier --write '**/*.{json,js,ts,tsx,css}'"
"dev": "webpack server --config webpack.dev.js",
"format": "prettier --write '**/*.{json,js,ts,tsx,css}'",
"build": "webpack --config webpack.dev.js",
"release": "webpack --config webpack.prd.js"
},
"keywords": [],
"author": "",
@ -30,6 +32,7 @@
"typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.10.0"
}
}

View File

@ -75,8 +75,6 @@ module.exports = {
filename: "index.html",
}),
],
mode: "development",
devtool: "inline-source-map",
experiments: {
asyncWebAssembly: true,
},

7
webpack.dev.js Normal file
View 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
View File

@ -0,0 +1,6 @@
const { merge } = require("webpack-merge");
const common = require("./webpack.common.js");
module.exports = merge(common, {
mode: "production",
});