Skip to content

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