files assets VS paths assets #4290
Unanswered
jonathanstanley
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The docs have several (conflicting?) sections on assets:
AssetHandling
: https://kit.svelte.dev/docs/assetsAssetsPath
: https://kit.svelte.dev/docs/modules#$app-paths-assetsconfig.kit.paths.assets
: https://kit.svelte.dev/docs/configuration#pathsconfig.kit.files.assets
: https://kit.svelte.dev/docs/configuration#filesconfig.kit.appDir
: https://kit.svelte.dev/docs/configuration#appdireach seems very similar, but also slightly different:
AssetHandling
suggests the path convention:$lib/assets/logo.png
. it hashes the file name. this doesn't appear to share much with the rest of this other than a similar name?AssetsPath
suggests the path convention:static
(outside thesrc
folder). this convention is also used for favicon in the preloaded template. why is this one outside the lib and even outside the src folder?config.kit.paths.assets
is used byAssetsPath
as an absolute path (in this context is it different than a url)? it's tricky because the docs are split up betweenconfig.kit.paths.assets
andAssetsPath
. Also,AssetsPath
makes it look like it is declared separately from the config:(perhaps
AssetsPath
docs section should folded into theconfig.kit.paths.assets
section?config.kit.files.assets
just saysI don't see any path suggestion. however, as i understand it, the default template does not use this for favicon. so perhaps the only difference is that
config.kit.files.assets
has no preprocessing andconfig.kit.paths.assets
does have preprocessing? ifconfig.kit.paths.assets
does have preprocessing shouldn't the path be within the src or lib?config.kit.appDir
appears to default to_app
and says:This isn't clear without an example. Presumably
paths.assets
is referring toconfig.kit.paths.assets
? The nameappDir
may be a misnomer if is actually intended to refer toassets
(not the entireapp
)? Is this to modify the rendered output path, ex:If I'm following this correctly, I'd be happy to submit a PR to clear this up.
Beta Was this translation helpful? Give feedback.
All reactions