Skip to content

Commit b6de488

Browse files
committed
build: switch to rspack
1 parent 164d041 commit b6de488

File tree

8 files changed

+726
-497
lines changed

8 files changed

+726
-497
lines changed

.browserslistrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Run `pnpm dlx autoprefixer --info` to view CSS properties that need polyfill
33
# From: https://github.com/adobe/react-spectrum/blob/main/.browserslistrc
44
chrome >= 79
5+
edge >= 88
56
firefox >= 85
67
safari >= 13
7-
edge >= 88
88

99
[legacy]
1010
# https://github.com/browserslist/browserslist
@@ -16,3 +16,4 @@ not op_mini all
1616
[development]
1717
last 1 chrome version
1818
last 1 firefox version
19+
last 1 safari version

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The following debugging tips may come in handy:
101101
- Prevent Terser from dropping `console.log` or `debugger` by changing `terserOptions` in [terser-config.json](./scripts/terser-config.json)
102102
- Set `PROFILING=1` env variable to load React profiling builds
103103
- Output `named` module & chunk ids in [webpack.config.js](./webpack.config.js)
104-
- Analyze build output with `npx webpack-bundle-analyzer public/js/webpack.manifest.json -h 0.0.0.0` (for full breakdown, change to `all: true` when writing `webpack.manifest.json` in [build-production.js](./scripts/build-production.mjs))
104+
- Analyze build output with `npx webpack-bundle-analyzer public/js/manifest.json -h 0.0.0.0` (for full breakdown, change to `all: true` when writing `manifest.json` in [build-production.js](./scripts/build-production.mjs))
105105

106106
## Other LWJGL subdomains:
107107

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
4949
"@radix-ui/react-compose-refs": "1.1.0",
5050
"@react-aria/overlays": "3.23.2",
51+
"@rspack/cli": "1.0.3",
52+
"@rspack/core": "1.0.3",
53+
"@rspack/plugin-react-refresh": "1.0.0",
5154
"@stitches/react": "1.2.8",
55+
"@swc/helpers": "0.5.13",
5256
"@types/lodash-es": "4.17.12",
5357
"@types/react": "18.3.5",
5458
"@types/react-dom": "18.3.0",
@@ -88,13 +92,8 @@
8892
"reselect": "5.1.1",
8993
"scroll-into-view-if-needed": "3.1.0",
9094
"shiki": "1.16.2",
91-
"source-map-loader": "5.0.0",
92-
"terser-webpack-plugin": "5.3.10",
9395
"typescript": "5.5.4",
9496
"use-context-selector": "2.0.0",
95-
"webpack": "5.94.0",
96-
"webpack-cli": "5.1.4",
97-
"webpack-dev-server": "5.1.0",
9897
"zustand": "4.5.5"
9998
},
10099
"overrides": {
@@ -106,11 +105,11 @@
106105
"scripts": {
107106
"start": "run-p dev:js dev:server",
108107
"build:styles": "NODE_ENV=development node ./scripts/build-styles.mjs",
109-
"dev:js": "WDS=1 webpack serve",
108+
"dev:js": "WDS=1 rspack serve",
110109
"dev:server": "NODE_ENV=development AWS_PROFILE=lwjgl node --no-warnings --watch server/index.mjs",
111110
"dev:debug": "NODE_ENV=development AWS_PROFILE=lwjgl node --inspect --preserve-symlinks server/index.mjs",
112111
"dev:test-production": "NODE_ENV=production AWS_PROFILE=lwjgl node --no-warnings --max_old_space_size=384 server/index.mjs --test --s3proxy --nocache --pretty",
113-
"production": "run-p production:*",
112+
"production": "run-p production:* && run-s post-production",
114113
"production:styles": "NODE_ENV=production node ./scripts/build-styles.mjs",
115114
"production:js": "NODE_ENV=production node ./scripts/build-production.mjs",
116115
"post-production": "node --no-warnings ./scripts/post-production.mjs",
@@ -119,5 +118,5 @@
119118
"lint": "eslint --ext .ts,.js,.tsx client/",
120119
"prettier": "prettier --write \"{client,server,scripts}/**/*.{ts,tsx,js,mjs,md,css}\""
121120
},
122-
"packageManager": "pnpm@9.8.0+sha512.8e4c3550fb500e808dbc30bb0ce4dd1eb614e30b1c55245f211591ec2cdf9c611cabd34e1364b42f564bd54b3945ed0f49d61d1bbf2ec9bd74b866fcdc723276"
121+
"packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1"
123122
}

0 commit comments

Comments
 (0)