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
Merge request reports
Activity
changed milestone to %16.3
assigned to @slashmanov
removed workflowpost-deploy-db-production label
removed missed:16.0 label
removed missed:16.1 label
removed missed:16.2 label
removed pipeline:mr-approved label
removed pipeline:run-as-if-jh label
added 1 commit
- 85b3928b - Add Vite for javascript assets in development mode
added pipeline:run-as-if-jh label
mentioned in merge request !115469 (merged)
added 1 commit
- 534188d6 - Add Vite for javascript assets in development mode
- Resolved by Jennifer Li
@markrian this version is exactly the same as the !115469 (merged) except for these changes:
- Removed
VITE_RUBY_SKIP_ASSETS_PRECOMPILE_EXTENSION
env from the.gitlab/ci/frontend.gitlab-ci.yml
- Added
ENV['VITE_RUBY_SKIP_ASSETS_PRECOMPILE_EXTENSION'] = 'true'
toconfig/application.rb
- Fixed wrong milestone and owner group in the
config/feature_flags/development/vite.yml
The reasoning behind removing the env from the CI config is that setting env in the
config/application.rb
file should always prevent us from compiling assets with Vite whichever way we chose to compile GitLab. Sincevite_ruby
reads the env during gem loading it is the only place I could think of where to put this variable. So in case that's not sufficient the pipeline in this MR will always fail.Could you please review this when you have time?
Edited by Stanislav Lashmanov - Removed
requested review from @markrian
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@e0ac3fa0
4 Warnings This merge request is quite big (1014 lines changed), please consider splitting it into multiple merge requests. 8100f574: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
This merge request has introduced duplicated yarn dependencies. 1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Duplicate yarn dependencies
The following dependencies should be de-duplicated:
Package "postcss" wants ^8.1.10 and could get 8.4.28, but got 8.4.27
Package "postcss" wants ^8.2.1 and could get 8.4.28, but got 8.4.27
Package "postcss" wants ^8.4.14 and could get 8.4.28, but got 8.4.27
Package "postcss" wants ^8.4.27 and could get 8.4.28, but got 8.4.27
Please run the following command and commit the changes to
yarn.lock
:node_modules/.bin/yarn-deduplicate --strategy fewer yarn.lock \ && yarn install
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Eugie Limpin (
@eugielimpin
) (UTC+8, 4 hours ahead of@slashmanov
)Doug Stull (
@dstull
) (UTC-4, 8 hours behind@slashmanov
)frontend Minahil Nichols (
@minahilnichols
) (UTC-4, 8 hours behind@slashmanov
)Himanshu Kapoor (
@himkp
) (UTC+7, 3 hours ahead of@slashmanov
)groupimport and integrate (frontend) Justin Ho (
@justin_ho
) (UTC+7, 3 hours ahead of@slashmanov
)Maintainer review is optional for groupimport and integrate (frontend) Please check reviewer's status!
Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
Rubygems
This merge request adds, or changes a Rubygems dependency. Please review the Gemfile guidelines.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost Userremoved groupfoundations label