-
Notifications
You must be signed in to change notification settings - Fork 12k
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
esbuild: Using Tailwind breaks stylesheet processing for CSS @imports with URLs ending in .css #28113
Labels
angular/build:application
area: @angular/build
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Comments
JulienZD
changed the title
Using Tailwind breaks stylesheet processing for CSS @imports with URLs ending in .css
esbuild: Using Tailwind breaks stylesheet processing for CSS @imports with URLs ending in .css
Jul 26, 2024
alan-agius4
added
type: bug/fix
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
area: @angular/build
labels
Jul 26, 2024
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jul 26, 2024
…hen Tailwind is configured This addresses a bug where `@import url()` statements with remote CSS files (ending in .css) caused build errors when Tailwind was present. The issue arised from incorrect handling of remote URLs by the stylesheet plugin, which treated them as local files. This fix ensures proper handling of remote CSS imports. Closes angular#28113
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jul 26, 2024
…hen Tailwind is configured This addresses a bug where `@import url()` statements with remote CSS files (ending in .css) caused build errors when Tailwind was present. The issue arised from incorrect handling of remote URLs by the stylesheet plugin, which treated them as local files. This fix ensures proper handling of remote CSS imports. Closes angular#28113
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jul 29, 2024
…hen Tailwind is configured This addresses a bug where `@import url()` statements with remote CSS files (ending in .css) caused build errors when Tailwind was present. The issue arised from incorrect handling of remote URLs by the stylesheet plugin, which treated them as local files. This fix ensures proper handling of remote CSS imports. Closes angular#28113
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jul 29, 2024
…hen Tailwind is configured This addresses a bug where `@import url()` statements with remote CSS files (ending in .css) caused build errors when Tailwind was present. The issue arised from incorrect handling of remote URLs by the stylesheet plugin, which treated them as local files. This fix ensures proper handling of remote CSS imports. Closes angular#28113
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jul 29, 2024
…hen Tailwind is configured This addresses a bug where `@import url()` statements with remote CSS files (ending in .css) caused build errors when Tailwind was present. The issue arised from incorrect handling of remote URLs by the stylesheet plugin, which treated them as local files. This fix ensures proper handling of remote CSS imports. Closes angular#28113
alan-agius4
added a commit
that referenced
this issue
Jul 29, 2024
…hen Tailwind is configured This addresses a bug where `@import url()` statements with remote CSS files (ending in .css) caused build errors when Tailwind was present. The issue arised from incorrect handling of remote URLs by the stylesheet plugin, which treated them as local files. This fix ensures proper handling of remote CSS imports. Closes #28113 (cherry picked from commit 7d52941)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
angular/build:application
area: @angular/build
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
build
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When Tailwind is configured in a project (maybe just PostCSS), any
@import url()
statement with a URL ending in.css
(such as@import url(https://fonts.googleapis.com/earlyaccess/notokufiarabic.css);
causes the build to fail, as the url is deemed a local file by the language filters passed toStyleSheetPluginFactory.create()
. Thecreate
method seems to register an esbuildonLoad
handler that will read the path as a local fileAny URLs ending in
.less
,.scss
or.sass
are also affected.In our case we can't easily remove
.css
from the imported URL, as it's defined by an imported third party CSS file.Minimal Reproduction
ng new
src/styles.css
:@import url(https://fonts.googleapis.com/earlyaccess/notokufiarabic.css);
npm run build
When no Tailwind config file is present, the build runs fine:
tailwind.config.js
and the@tailwind
lines from the CSS file, while keeping the@import url()
npm run build
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: