Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented May 12, 2023

When using a global script (scripts option) with the esbuild-based browser application builder, an attempt to read the script as a relative path from the workspace root will be performed first. This avoids the need to perform a potentially expensive module resolution attempt for files that are directly available and also ensures the relative paths are given priority over any potential modules with the same name. This matches prior behavior that also preferred relative paths.

Closes #25198

…ad first in esbuild builder

When using a global script (`scripts` option) with the esbuild-based browser application builder,
an attempt to read the script as a relative path from the workspace root will be performed first.
This avoids the need to perform a potentially expensive module resolution attempt for files that
are directly available and also ensures the relative paths are given priority over any potential
modules with the same name. This matches prior behavior that also preferred relative paths.
@clydin clydin added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels May 12, 2023
@clydin clydin requested a review from alan-agius4 May 12, 2023 17:25
@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 May 15, 2023
@angular-robot angular-robot bot merged commit 141d74d into angular:main May 15, 2023
@clydin clydin deleted the esbuild/relative-global-scripts branch May 15, 2023 13:24
@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 Jun 15, 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: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

esbuild: Error when declaring relative path global scripts without starting them by "./" on Windows.

2 participants