-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Migrates to vite@6 to drop base64 inlined worker source from all bundles
#1637
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?
Migrates to vite@6 to drop base64 inlined worker source from all bundles
#1637
Conversation
Without this change, build would fail because the produced stylesheet assumes the `package.json['name']` i.e., `styles/rrweb.css`. To maintain the existing behavior, these changes are required. See https://vite.dev/guide/migration.html#customize-css-output-file-name-in-library-mode
vite@6 to drop base64 inlined worker source from all bundles
|
Thanks for taking your time to upgrade vite Rui!
Edit: I take this back, I hadn't read the code changes in vite 6, this will totally fix the issue, and I'm happy to put in the time to get this over the finish line. |
🦋 Changeset detectedLatest commit: fcea902 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
👀 |
|
@ruiconti @Juice10 @pauldambra When did this one merge? |
|
🙏 |
24af677 to
aacb7c4
Compare
|
Apologies for the delay, somehow I missed the notifications from this PR. @Juice10 Thanks for creating the changeset. I've just rebased from |
|
PostHog/posthog-js#1464 (comment) users are confirming that a vite6 bundled rrweb passes chrome extension validation for them |
|
@Juice10 @eoghanmurray is there anything we can do to help this one along? We would prefer not to diverge from upstream on this if we could avoid it |
|
just a ping, we've had this in prod at PostHog for some time now (there was a little fiddling around names of generated files but that might be particular to us) it does definitely resolve the "using rrweb in a chrome extension" problem |
|
@Juice10 Can we get a review on this? We would also prefer not to diverge from upstream as well |
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.
Pull Request Overview
This PR migrates the project from Vite 5 to Vite 6 to address an issue where base64-inlined worker source code was being included in all bundles. The upgrade involves updating vite dependencies across 18 packages and making related configuration changes.
Key Changes:
- Upgraded vite from
^5.xto^6.0.1across all packages - Updated transitive dependencies (esbuild to 0.24.2, rollup to 4.32.0, postcss to 8.5.1)
- Added explicit
cssFileName: 'style'configuration in vite.config.default.ts - Added new CSS export path
./dist/rrweb.cssin packages/rrweb/package.json
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates esbuild (0.21.5→0.24.2), rollup (4.18.0→4.32.0), postcss (8.4.38→8.5.1), and related platform-specific binaries |
| vite.config.default.ts | Adds explicit cssFileName: 'style' to library config; removes commented rollupOptions code |
| packages/rrweb/package.json | Adds new CSS export ./dist/rrweb.css; updates vite to ^6.0.1 |
| 17 other package.json files | Updates vite dependency from ^5.x to ^6.0.1 |
| .changeset/cuddly-dolphins-approve.md | Documents the change for 6 affected packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi all, I'd love to merge this but something is causing the tests to time-out after 6 hours, seems to only happen on this PR. |

Investigation: #1578 (comment)
Motivation: #1568 (comment)
Opening this tentatively to see if there's interest in merging this, so consumers don't have to rely on patches to fix this issue. If there is, happy to comply with all the contributing guidelines, rebases to
master, etc.Resolves #1578