Skip to content
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

Migrates to vite@6 to drop base64 inlined worker source from all bundles #1637

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ruiconti
Copy link

@ruiconti ruiconti commented Jan 24, 2025

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

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
@ruiconti ruiconti changed the title Removes base64 inlined worker source from all bundles Migrates to vite@6 to drop base64 inlined worker source from all bundles Jan 24, 2025
@Juice10
Copy link
Contributor

Juice10 commented Feb 4, 2025

Thanks for taking your time to upgrade vite Rui! This won't have the intended result I'm afraid since we are explicitly requesting the worker to be inlined (see &inline code below):

import ImageBitmapDataURLWorker from '../../workers/image-bitmap-data-url-worker?worker&inline';

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.

Copy link

changeset-bot bot commented Feb 4, 2025

🦋 Changeset detected

Latest commit: 24af677

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@rrweb/all Patch
@rrweb/packer Patch
@rrweb/record Patch
rrweb-snapshot Patch
rrweb Patch
@rrweb/web-extension Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/replay Patch
@rrweb/types Patch
@rrweb/utils Patch
rrvideo Patch
@rrweb/rrweb-plugin-console-record Patch
@rrweb/rrweb-plugin-console-replay Patch
@rrweb/rrweb-plugin-sequential-id-record Patch
@rrweb/rrweb-plugin-sequential-id-replay Patch
@rrweb/rrweb-plugin-canvas-webrtc-record Patch
@rrweb/rrweb-plugin-canvas-webrtc-replay Patch

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

@Juice10 Juice10 self-requested a review February 4, 2025 15:55
@Juice10 Juice10 self-assigned this Feb 4, 2025
@Juice10
Copy link
Contributor

Juice10 commented Feb 4, 2025

@ruiconti could you rebase this PR on the latest master branch? Failing CI is fixed there.

Edit: looks like this PR needs to be merged first before a rebase would fix the issue: #1647

@pauldambra
Copy link
Contributor

👀

@dzcora
Copy link

dzcora commented Feb 17, 2025

@ruiconti @Juice10 @pauldambra When did this one merge?

@ebloom19
Copy link

🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Using RRWeb in chrome extension results in obfuscated code
5 participants