Skip to content

fix(@angular-devkit/build-angular): avoid implicit CSS file extensions when resolving#27158

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
clydin:esbuild/no-implicit-style-extensions
Mar 4, 2024
Merged

fix(@angular-devkit/build-angular): avoid implicit CSS file extensions when resolving#27158
alan-agius4 merged 1 commit intoangular:mainfrom
clydin:esbuild/no-implicit-style-extensions

Conversation

@clydin
Copy link
Member

@clydin clydin commented Feb 23, 2024

Unlike the non-ESM Node.js resolution for JS files, CSS does not have the concept of implicit file extensions. To avoid incorrectly resolving a file as CSS, stylesheet bundling no longer attempts to resolve implicit extensions. Preprocessors, such as Sass, contain logic internally that handles any specific resolution cases for their respective preprocessor and such behavior is unaffected.

Closes #27147

…s when resolving

Unlike the non-ESM Node.js resolution for JS files, CSS does not have the concept
of implicit file extensions. To avoid incorrectly resolving a file as CSS,
stylesheet bundling no longer attempts to resolve implicit extensions. Preprocessors,
such as Sass, contain logic internally that handles any specific resolution cases
for their respective preprocessor and such behavior is unaffected.
@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Feb 23, 2024
@clydin clydin requested a review from alan-agius4 February 23, 2024 14:52
@clydin clydin linked an issue Feb 26, 2024 that may be closed by this pull request
1 task
@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 Mar 4, 2024
@alan-agius4 alan-agius4 merged commit 8d1a7c3 into angular:main Mar 4, 2024
@clydin clydin deleted the esbuild/no-implicit-style-extensions branch March 4, 2024 12:36
@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 Apr 4, 2024
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 builders inconsistent in importing CSS vs SCSS if both files exist [Application builder] Styles import resolution

2 participants