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

Can't load /smui.css in app.html ? #489

Closed
kuchaguangjie opened this issue Jul 22, 2022 · 4 comments
Closed

Can't load /smui.css in app.html ? #489

kuchaguangjie opened this issue Jul 22, 2022 · 4 comments
Labels
bug Something isn't working upstream Something is wrong with an upstream library, and it affects SMUI.

Comments

@kuchaguangjie
Copy link

kuchaguangjie commented Jul 22, 2022

Describe the bug
After upgrade sveltekit, which use vite 3.0, when open page, get error:

Failed to load url /smui.css?direct (resolved id: /smui.css?direct).
This file is in /public and will be copied as-is during build without going through the plugin transforms,
and therefore should not be imported from source code. It can only be referenced via HTML tags.

Under static/, I can see smui.css and smui-dark.css generated, it used to work, but suddenly got above issue.

Link: stackoverflow question

@kuchaguangjie kuchaguangjie added the bug Something isn't working label Jul 22, 2022
@kuchaguangjie
Copy link
Author

My current solution is to copy smui.css to src/, then in __layout.svelte import it via import "../smui.css";

@wickning1
Copy link

I think this is a very recent bug in sveltekit:

sveltejs/kit#5672

@hperrin
Copy link
Owner

hperrin commented Jul 22, 2022

@wickning1 It seems to be. I'm hitting the same issue in the demo site.

@hperrin hperrin added the upstream Something is wrong with an upstream library, and it affects SMUI. label Jul 22, 2022
@kuchaguangjie
Copy link
Author

bug fixed in 1.0.0-next.392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Something is wrong with an upstream library, and it affects SMUI.
Projects
None yet
Development

No branches or pull requests

3 participants