-
Notifications
You must be signed in to change notification settings - Fork 242
Migrate to vite for webui #1399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
To run a dev server you can just enter Running The default server can be built using I did not touch the existing tsconfig as much as possible, but it could be further improved. Vite does not use tsc for building but rather uses esbuild, so the tsconfig for building the app has an explicit |
gnugomez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
| "build:default": "webpack --config ./configs/webpack.config.js --mode production", | ||
| "watch:default": "webpack --config ./configs/webpack.config.js --mode development --watch --progress --color", | ||
| "build:default": "tsc -p ./configs/server.tsconfig.json && vite build", | ||
| "watch:default": "vite serve", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question (non-blocking): why did you changed this script to watch:default from dev?
Vite dev server does not generate any output, it acts as a middleware server that transforms whatever you ask for on the fly, thus it gets a bit confusing to me the wording watch since this has historically been used for tools like babel or webpack where we live transpile code and generate an output. I would argue to leave it as dev as it already is a widely adopted convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept the previous script as is, dev:default would probably be more appropriate.
The suffix :default is still useful imho, as you need to distinguish between the component library and the app you are building.
|
any objection to merge that PR? That would make frontend development less painful. |
This PR is intended to migrate the existing frontend build system to use vite.
Changes: