Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(worker): force rollup to build worker module under watch mode #11919

Merged
merged 1 commit into from
Mar 12, 2023

Conversation

fi3ework
Copy link
Member

@fi3ework fi3ework commented Feb 3, 2023

fix #8172
fix #11786
close superseds #8700

In build watch mode, the transform hook will not be called after the load hook of vite:worker plugin except in the very first build. So use shouldtransformcachedmodule hook to indicate re-call transform hook in watch build mode.

Additional context


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.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • 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).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) feat: web workers labels Mar 12, 2023
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!

This doesn't seem to work when editing playground/worker/sub-worker.js. But I think that can be tackled in a different PR.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feat: web workers p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
3 participants