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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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:
AssetHandlingsuggests 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?AssetsPathsuggests the path convention:static(outside thesrcfolder). 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.assetsis used byAssetsPathas an absolute path (in this context is it different than a url)? it's tricky because the docs are split up betweenconfig.kit.paths.assetsandAssetsPath. Also,AssetsPathmakes it look like it is declared separately from the config:(perhaps
AssetsPathdocs section should folded into theconfig.kit.paths.assetssection?config.kit.files.assetsjust 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.assetshas no preprocessing andconfig.kit.paths.assetsdoes have preprocessing? ifconfig.kit.paths.assetsdoes have preprocessing shouldn't the path be within the src or lib?config.kit.appDirappears to default to_appand says:This isn't clear without an example. Presumably
paths.assetsis referring toconfig.kit.paths.assets? The nameappDirmay 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