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

Allow for bundling of worker scripts during dev #10697

Open
4 tasks done
schickling opened this issue Oct 28, 2022 · 1 comment
Open
4 tasks done

Allow for bundling of worker scripts during dev #10697

schickling opened this issue Oct 28, 2022 · 1 comment
Labels
feat: web workers performance Performance related enhancement

Comments

@schickling
Copy link
Contributor

Description

Vite's dynamic import system is great for most frontend development use cases however in some situations e.g. when developing complex worker scripts, it might be preferable to bundle the worker scripts even during development as starting a worker (e.g. via new Worker('....')) can be significantly (e.g. multiple seconds) slower.

Suggested solution

It would be great if there was an option to continuously bundle worker scripts during yarn dev (even if that means features like HMR etc won't work)

Alternative

No response

Additional context

No response

Validations

@patak-dev patak-dev added performance Performance related enhancement and removed enhancement: pending triage labels Mar 10, 2023
@bluwy bluwy changed the title Allow for bundling of worker scripts during yarn dev Allow for bundling of worker scripts during dev Nov 10, 2023
@itsjohncs
Copy link

Plugin implementing this: https://github.com/itsjohncs/vite-plugin-prebundle-workers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: web workers performance Performance related enhancement
Projects
None yet
Development

No branches or pull requests

4 participants