Something I would love to see is instruction on where to put static elements like images. I have been successful in putting them directly in the build output folder, but is this the correct practice? I would think they would go in the src folder and be part of the compile. But I have not been able to get the compiler to include static files. Is there a compiler directive to make this happen?
I even pulled a REPL of the svelte example that uses and references a static image and found that the image was not included in the download :). Such a simple thing, but I don't see it addressed in the docs (probably not looking in the right place).
OK, I think I see now - really a noob w/ svelte - The static stuff goes in public, and the built stuff gets put in build. That makes sense. Did I get that right?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Helpful article.
Something I would love to see is instruction on where to put static elements like images. I have been successful in putting them directly in the build output folder, but is this the correct practice? I would think they would go in the src folder and be part of the compile. But I have not been able to get the compiler to include static files. Is there a compiler directive to make this happen?
I even pulled a REPL of the svelte example that uses and references a static image and found that the image was not included in the download :). Such a simple thing, but I don't see it addressed in the docs (probably not looking in the right place).
Thanks!
OK, I think I see now - really a noob w/ svelte - The static stuff goes in public, and the built stuff gets put in build. That makes sense. Did I get that right?