Skip to content

Commit 661a7f3

Browse files
committed
Upgrade to latest Babel, webpack, and related packages
Upgrades: - @babel/core and plugins: 7.14.x → 7.29.0 - webpack-dev-server: 3.11.2 → 5.2.3 - webpack-cli: 4.7.0 → 4.10.0 - webpack-merge: 5.7.3 → 6.0.1 - html-webpack-plugin: 5.3.1 → 5.6.6 - source-map-loader: 3.0.0 → 3.0.2 - Added @babel/plugin-transform-private-property-in-object to eliminate Babel "loose" mode warnings Also fixes electron-builder bundle to exclude all node_modules except explicitly needed native modules (better-sqlite3, bindings, file-uri-to-path). This reduces the app bundle from 409MB with 39,105 files down to 205MB with only 52 files.
1 parent 1ec17bb commit 661a7f3

3 files changed

Lines changed: 2313 additions & 1615 deletions

File tree

package.json

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@
3434
},
3535
"publish": null,
3636
"files": [
37+
"!**/node_modules/**/*",
3738
"package.json",
3839
{
3940
"from": "dist",
4041
"to": ".",
41-
"filter": ["**/*", "!**/*.map"]
42+
"filter": [
43+
"**/*",
44+
"!**/*.map"
45+
]
4246
},
4347
"node_modules/better-sqlite3/**/*",
4448
"node_modules/bindings/**/*",
@@ -78,18 +82,20 @@
7882
"prettier": "^2.3.0",
7983
"typescript-styled-plugin": "^0.17.0",
8084
"webpack-cli": "^4.7.0",
81-
"webpack-dev-server": "^3.11.2"
85+
"webpack-dev-server": "^5.2.3"
8286
},
8387
"dependencies": {
84-
"@babel/core": "^7.14.3",
85-
"@babel/plugin-proposal-class-properties": "^7.13.0",
86-
"@babel/plugin-proposal-decorators": "^7.14.2",
87-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
88-
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
88+
"@babel/core": "^7.29.0",
89+
"@babel/plugin-proposal-class-properties": "^7.18.6",
90+
"@babel/plugin-proposal-decorators": "^7.29.0",
91+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
92+
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
93+
"@babel/plugin-proposal-private-methods": "^7.18.6",
8994
"@babel/plugin-syntax-optional-chaining": "^7.8.3",
90-
"@babel/preset-env": "^7.14.2",
91-
"@babel/preset-react": "^7.13.13",
92-
"@babel/preset-typescript": "^7.13.0",
95+
"@babel/plugin-transform-private-property-in-object": "^7.28.6",
96+
"@babel/preset-env": "^7.29.0",
97+
"@babel/preset-react": "^7.28.5",
98+
"@babel/preset-typescript": "^7.28.5",
9399
"@emotion/react": "^11.5.0",
94100
"@emotion/styled": "^11.3.0",
95101
"@koa/router": "^10.0.0",
@@ -192,7 +198,7 @@
192198
"unified": "^9.2.1",
193199
"uuid": "^8.3.2",
194200
"webpack": "^5.105.0",
195-
"webpack-merge": "^5.7.3"
201+
"webpack-merge": "^6.0.1"
196202
},
197203
"volta": {
198204
"node": "20.18.2",

webpack.config.base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const baseConfig: webpack.Configuration = {
8080
['@babel/plugin-proposal-decorators', {legacy: true}],
8181
['@babel/plugin-proposal-class-properties', {loose: true}],
8282
['@babel/plugin-proposal-private-methods', {loose: true}],
83+
['@babel/plugin-transform-private-property-in-object', {loose: true}],
8384
['@babel/plugin-proposal-optional-chaining'],
8485
['@babel/plugin-proposal-nullish-coalescing-operator'],
8586
!IS_PROD && require.resolve('react-refresh/babel'),

0 commit comments

Comments
 (0)