Skip to content
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

[Bug]: Fontsource loader writes wrong path #68

Open
luastoned opened this issue Apr 26, 2024 · 0 comments
Open

[Bug]: Fontsource loader writes wrong path #68

luastoned opened this issue Apr 26, 2024 · 0 comments

Comments

@luastoned
Copy link

luastoned commented Apr 26, 2024

Hello,

these two cases push an additional / breaking import statement.

source.push(`import '@fontsource-variable/${name}/standard.css';`)
continue
}
// If the selected axes is not within standard, return full
source.push(`import '@fontsource-variable/${name}/full.css';`)

The build step then breaks:

transforming (1) index.htmlUnable to resolve `@import "import '@fontsource-variable/open-sans/standard.css';"` from /undebug
✓ 4 modules transformed.
x Build failed in 84ms
error during build:
Error: [vite:css] [postcss] ENOENT: no such file or directory, open 'import '@fontsource-variable/open-sans/standard.css';'
file: unfonts.css:undefined:NaN

The logic for variable is also odd, it does not matter if opsz is true or false, simply being there has unintended side effects.

@luastoned luastoned changed the title Fontsource loader writes wrong path [Bug] Fontsource loader writes wrong path Apr 26, 2024
@luastoned luastoned changed the title [Bug] Fontsource loader writes wrong path [Bug]: Fontsource loader writes wrong path Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant