-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Webpack to Vite #7687
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
Webpack to Vite #7687
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7687 +/- ##
=======================================
Coverage 99.37% 99.37%
=======================================
Files 1089 1089
Lines 97539 97539
=======================================
Hits 96934 96934
Misses 605 605 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Address complaints from `git diff check main...`
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, Thank you for fixing this!
@seunomonije - I am not able to run If I try to run it locally the script advises
After installing webpack-cli the
Is there an easy fix for this or should we roll-back? |
@pavoljuhas will look at this in a bit and have something for you within a few hours It looks like we need to remove the dependency on webpack and point it to the new Vite work, it doesn't look like an involved fix off of a first look |
The solution will be to move away from the webpack bundler in the check script, which I missed due to the silent failing in the CI. The culprit lines are here, where we're still using webpack even though it's no longer supported. First attempt will be to change this to just |
@seunomonije - sounds great, thank you for prompt response! |
Ok so I have identified the issue and proposed a fix in a draft PR #7697 This draft PR successfully checks the bundle files are produced, and also completes the e2e tests, showing this new pipeline's artifacts match the existing pictures from the legacy Webpack bundler. Info on the issue: it stems from the fact that Vite does not allow you to export build information in an array (see here, and here). In the last PR, I made a mistake during development and pushed up The reason this #7697 is still in draft is that the bundle files are much bigger than the last ones, and I would like to spend a bit more time researching if there is a cleaner way to handle the config file. After spending ~2 hours researching I haven't come across a "no-brainer" solution, but I'd like to investigate a bit more before feeling good about it. That being said, this patch is functional enough fix the issue, and happy to be helpful wherever is best. |
Resolves #7654, sunsetting Webpack support and introducing the more modern Vite as the core bundler for typescript in Cirq.
Implementation notes:
canvas
polyfill invitest.setup.ts
, allowing for three.js to be tested without the browser environment. There have been discussions about this in Vite and external packages which could offer more context, but I opted to implement something custom considering that package deps have been pain point.