mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 04:14:25 +00:00
Ensure prod builds don't use inline source maps
The bundle grew by a factor of 4, so let's only do that while we're developing.
This commit is contained in:
parent
29c20dca06
commit
59ddaa82b8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
686
js/package-lock.json
generated
686
js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,8 @@
|
||||
"ts-loader": "^8.3.0",
|
||||
"typescript": "^4.3.2",
|
||||
"webpack": "^5.72.0",
|
||||
"webpack-cli": "^4.7.0"
|
||||
"webpack-cli": "^4.7.0",
|
||||
"webpack-dev-server": "^4.11.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.11.5",
|
||||
@ -24,7 +25,6 @@
|
||||
"preact": "^10.7.1",
|
||||
"react-bootstrap": "^2.2.3",
|
||||
"style-loader": "^2.0.0",
|
||||
"webpack-dev-server": "^4.11.1",
|
||||
"xterm": "^4.12.0",
|
||||
"xterm-addon-fit": "^0.5.0",
|
||||
"xterm-addon-web-links": "^0.4.0",
|
||||
|
@ -2,6 +2,14 @@ const path = require('path');
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const LicenseWebpackPlugin = require('license-webpack-plugin').LicenseWebpackPlugin;
|
||||
|
||||
var devtool;
|
||||
|
||||
if (process.env.DEV === '1') {
|
||||
devtool = 'inline-source-map';
|
||||
} else {
|
||||
devtool = 'source-map';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
entry: "./src/main.ts",
|
||||
entry: {
|
||||
@ -10,7 +18,7 @@ module.exports = {
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../bindata/static/js/'),
|
||||
},
|
||||
devtool: "inline-source-map",
|
||||
devtool: devtool,
|
||||
resolve: {
|
||||
extensions: [".ts", ".tsx", ".js"],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user