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

fix(worker): support UTF-8 encoding in inline workers (fixes #12117) #15866

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

xiaohk
Copy link
Contributor

@xiaohk xiaohk commented Feb 10, 2024

Description

This PR fixes #12117. It's based on PR #12122. This PR allows inline worker to include UTF-8 characters.

Additional context

This PR rebases #12122 into main and adds a test.

superseds close #12122


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines, especially the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

Signed-off-by: Jay Wang <jay@zijie.wang>
Signed-off-by: Jay Wang <jay@zijie.wang>
Copy link

stackblitz bot commented Feb 10, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red added feat: web workers p3-minor-bug An edge case that only affects very specific usage (priority) labels Feb 11, 2024
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

packages/vite/src/node/plugins/worker.ts Outdated Show resolved Hide resolved
Co-authored-by: 翠 / green <green@sapphi.red>
@sapphi-red sapphi-red changed the title fix: support UTF-8 encoding in inline Web Workers (based on #12122) (fixes #12117) fix(worker): support UTF-8 encoding in inline workers (fixes #12117) Feb 11, 2024
@patak-dev patak-dev merged commit 570e0f1 into vitejs:main Feb 12, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: web workers p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline Web Worker looses special characters
3 participants