build: Proposal to move from webpack to vite#19315
Conversation
|
My 50 cents here: vite 8 uses |
jgoz
left a comment
There was a problem hiding this comment.
I cloned locally and only saw one minor issue. It looks like my comments and the behavior around the Blueprint/Sass weirdness are preserved, so no concerns from me. Nice job!
Co-authored-by: John Gozde <john@gozde.ca>
FrankChen021
left a comment
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 2 |
| P3 | 0 |
| Total | 3 |
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 2 |
| P3 | 0 |
| Total | 3 |
Reviewed 19 of 19 changed files.
This is an automated review by Codex GPT-5.6-Sol
| "webpack-bundle-analyzer": "^4.10.1", | ||
| "webpack-cli": "^5.1.4", | ||
| "webpack-dev-server": "^5.2.2" | ||
| "vite": "^8.1.4", |
There was a problem hiding this comment.
[P1] Align the declared Node engine with Vite 8
The locked Vite version requires Node ^20.19.0 || >=22.12.0, while the package still advertises >=20; Node 20.0-20.18 users therefore satisfy the project constraint but cannot reliably build or start the console.
| echo "Webpacking everything..." | ||
| NODE_ENV=production ./node_modules/.bin/webpack -c webpack.config.mjs --mode=production | ||
| echo "Building with Vite..." | ||
| NODE_ENV=production ./node_modules/.bin/vite build |
There was a problem hiding this comment.
[P2] Keep TypeScript errors fatal during builds
vite build transpiles without type-checking, unlike the removed ts-loader path. Maven CI runs test-ci without tsc --noEmit, allowing errors in untested source files to be packaged.
| codeSplitting: false, | ||
| assetFileNames: (assetInfo) => { | ||
| if (/\.(woff2?|ttf|eot)$/.test(assetInfo.name || '')) { | ||
| return 'fonts/[name][extname]'; |
There was a problem hiding this comment.
[P2] Generate font URLs under the served /public path
With Vite's default base, imported Fontsource CSS points to /fonts/..., while files are emitted under public/fonts and Jetty exposes only /public/*; production font requests will return 404.
Description
Draft code inspired by a question from @jtuglu1 #19312 (comment). I took it literally and used a claude session to plan and execute this proposed move to Vite. This was very much an exercise born out of curiosity so I am opening this for CI to run and will put in in Draft as I self review it and look for feedback regarding the webpack versus vite discussion. I did do basic testing locally where I had the vite dev server running locally and was making changes and seeing the millisecond response time from change to seeing it in my local. Even so, a larger discussion is warranted and there would likely be follow ups. The plan my session put in place marked multiple things as bridge solutions to minimize the changeset, but would require follow ups to fully leverage vite.
Release note
N/A
Key changed/added classes in this PR
vite.config.mtsThis PR has: