Skip to content

build: simplify setup with Vite v2.9 #45

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Floriszenz
Copy link
Collaborator

This draft proposes simplifying the build setup.
With the release of Vite version 2.9 several worker issues have been fixed, including

  • emitting nested worker files during build,
  • generate sourcemaps for workers,
  • (allow using classic instead of module workers).

However, the current state of this branch is not working with, e.g. the vite-ts test app. Building the library works as expected with the simplified setup, but importing the lib into the test app does not work. The main problem seems to be that Vite resolves the new URL(..., import.meta.url) pattern and replaces it with a path (without the URL constructor) during build, but then the Vite app is not able to resolve the worker files.

This needs more investigation and maybe requires creating another issue in Vite, but this PR can serve as a base for further investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant