Draft: Add Vite for development mode
Add Vite for javascript assets in development mode (!115469 - merged)
This is outdated. VisitWhat does this MR do and why?
This MR adds vite as a frontend runner instead of webpack in development mode.
How to test locally
- Run
echo "Feature.enable(:vite)" | gdk rails c
- (optionally) Run
echo "Feature.enable(:vite_stylesheets)" | gdk rails c
, this will enable Vite for styles - Launch
bundle exec vite dev
- Restart GDK
Issues with local vite server
Current configuration assumes you've set up gdk.test
domain on a specific IP address. In case you're running it on localhost
please change config/vite.json
development host to localhost
.
How to build
Make sure you have 10GB of RAM free.
- Run
NODE_OPTIONS="--max_old_space_size=10240" bundle exec vite build
TODO
-
Merge Change url variable syntax to a valid one (gitlab-ui!2965 - merged) -
Fix EE and JH styles -
Put everything under a feature flag -
Make it work for production build and other envs -
Test, test, test -
Replace remaining webpack-related stuff with vite counterparts
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Stanislav Lashmanov