svelte-material-ui: Failed to load "/smui.css"

968 views Asked by At

After upgrade sveltekit, which use vite 3.0.2, 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.

Any idea?

Link: github issue

1

There are 1 answers

0
Eric On

This is a sveltekit bug (vite related), which was fixed in 1.0.0-next.392.

Refer: https://github.com/sveltejs/kit/issues/5672