vite icon indicating copy to clipboard operation
vite copied to clipboard

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

Open fi3ework opened this issue 2 years ago • 0 comments

fix #8172 fix #11786

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 returning a timestamp in the watch mode to indicate rollup re-invoke the transform hook, and the load hook returned value will not be used indeed.

Additional context


What is the purpose of this pull request?

  • [x] Bug fix
  • [ ] New Feature
  • [ ] Documentation update
  • [ ] Other

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

  • [x] Read the Contributing Guidelines.
  • [x] Read the Pull Request Guidelines and follow the PR Title Convention.
  • [x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • [x] 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.

fi3ework avatar Feb 03 '23 04:02 fi3ework