Add Vite for javascript assets
What does this MR do and why?
This MR adds vite as a frontend runner for javascript assets instead of webpack in development mode.
This is intended only for developer experience evaluation purposes. That's why it's behind a feature flag.
This MR fixes the issue with the CNG deployments from Add Vite for javascript assets in development mode (!115469 - merged).
How to test locally
- Run
echo "Feature.enable(:vite)" | gdk rails c
- 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
Edited by Stanislav Lashmanov