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

404's on CSS files in sapper #6

Open
MTyson opened this issue Apr 22, 2021 · 7 comments
Open

404's on CSS files in sapper #6

MTyson opened this issue Apr 22, 2021 · 7 comments

Comments

@MTyson
Copy link

MTyson commented Apr 22, 2021

Describe the bug

Following the example in this repo, I get 404s when importing the CSS files:

Logs

GET http://localhost:3000/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css net::ERR_ABORTED 404 (Not Found)
create:1 GET http://localhost:3000/filepond/dist/filepond.min.css net::ERR_ABORTED 404 (Not Found)

This may be something I'm doing dumb rather than a bug.

@MTyson
Copy link
Author

MTyson commented Apr 23, 2021

I worked around this by changing the import in Component.svelte to:

import '../../filepond/dist/filepond.min.css';

In the script tag.

@rikschennink
Copy link
Collaborator

@MTyson thanks, will look into this when I have some time.

@MTyson
Copy link
Author

MTyson commented Apr 29, 2021

Thanks for the component, it is working great now @rikschennink

@hobbitronics
Copy link

I am having the same issue getting the css to work as shown in the docs. Tanks for the workaround MTyson.

@MTyson
Copy link
Author

MTyson commented May 6, 2021

I had to pull the code into my project because when building to production, the workaround is lost.

@rikschennink
Copy link
Collaborator

rikschennink commented May 10, 2021

I've restructured the component, hope that helps. The css import is now separate from the Svelte component and no longer in the <style> tag, this seems to work in my test. Published as 0.2.0

import 'filepond/dist/filepond.min.css';

@MTyson
Copy link
Author

MTyson commented May 11, 2021

Awesome, thanks again.

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

3 participants