Skip to content

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

Merged
bluwy merged 1 commit intovitejs:mainfrom
fi3ework:force-worker-build
Mar 12, 2023
Merged

fix(worker): force rollup to build worker module under watch mode#11919
bluwy merged 1 commit intovitejs:mainfrom
fi3ework:force-worker-build

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.

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.

build --watch doesnt build workers Inlined workers aren't being rebuilt while using lib mode and build --watch

3 participants