Astro Info
Astro v7.0.0
Node v24.16.0
System Linux (x64)
Package Manager pnpm
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
n/a
Describe the Bug
Even with the fix for #17156, Astro 7 can't resolve TS alias URLs inside <style> blocks for at least these two situations:
@import url("@/path/to/style.css"); causes (example):
Error: Can't resolve '@/styles/tailwind.css' in '/REPO/temp/astro-7-tailwind-bug/src/components'
at finishWithoutResolve (/REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:942:18)
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1034:14
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1111:5
at eval (eval at create (/REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:15:1)
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1111:5
at eval (eval at create (/REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:27:1)
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:94:43
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1111:5
at eval (eval at create (/REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:15:1)
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1111:5
@reference "@/path/to/tailwind.css"; causes (example):
Error: Can't resolve '@/styles/tailwind.css' in '/REPO/temp/astro-7-tailwind-bug/src/components'
at finishWithoutResolve (/REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:942:18)
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1034:14
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1111:5
at eval (eval at create (/REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:15:1)
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1111:5
at eval (eval at create (/REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:27:1)
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:94:43
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1111:5
at eval (eval at create (/REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:31:10), <anonymous>:15:1)
at /REPO/temp/astro-7-tailwind-bug/node_modules/.pnpm/[email protected]/node_modules/enhanced-resolve/lib/Resolver.js:1111:5
What's the expected result?
Both types of references work like they did in v6
Link to Minimal Reproducible Example
https://github.com/TimonLukas/astro-7-tailwind-bug
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
n/a
Describe the Bug
Even with the fix for #17156, Astro 7 can't resolve TS alias URLs inside
<style>blocks for at least these two situations:@import url("@/path/to/style.css");causes (example):@reference "@/path/to/tailwind.css";causes (example):What's the expected result?
Both types of references work like they did in v6
Link to Minimal Reproducible Example
https://github.com/TimonLukas/astro-7-tailwind-bug
Participation