Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Oct 27, 2023

When using the application builder with the development server, Web Worker URLs previously may have been incorrectly resolved. This caused Vite to consider the Web Worker URLs as outside the project root and generate a special file system URL. While this worked on Mac/Linux, it would fail on Windows. Since Vite does not appear to support resolve plugins for Web Workers, the virtual project root for the in-memory build has now been adjusted to allow the referencing file to have a path that resolves the Web Worker URL to a project relative location.

@clydin clydin force-pushed the esbuild/vite-web-workers branch from d301055 to 6f73137 Compare October 27, 2023 19:51
@clydin clydin linked an issue Oct 27, 2023 that may be closed by this pull request
1 task
@clydin clydin force-pushed the esbuild/vite-web-workers branch 3 times, most recently from 2d18b87 to 935c402 Compare October 27, 2023 23:25
@clydin clydin marked this pull request as ready for review October 27, 2023 23:43
@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels Oct 27, 2023
@clydin clydin requested a review from alan-agius4 October 27, 2023 23:43
…olution in vite dev server

When using the application builder with the development server, Web Worker URLs previously may
have been incorrectly resolved. This caused Vite to consider the Web Worker URLs as outside
the project root and generate a special file system URL. While this worked on Mac/Linux, it
would fail on Windows. Since Vite does not appear to support resolve plugins for Web Workers,
the virtual project root for the in-memory build has now been adjusted to allow the referencing
file to have a path that resolves the Web Worker URL to a project relative location.
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 30, 2023
@alan-agius4 alan-agius4 merged commit 09682e5 into angular:main Oct 30, 2023
@clydin clydin deleted the esbuild/vite-web-workers branch October 30, 2023 11:05
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

esbuild-builders: webworker resolves invalid url
2 participants