Skip to content

Components aren't fetched again after loaded once #12

Answered by FranckFreiburger
nelhwong asked this question in Q&A
Discussion options

You must be logged in to vote

Hi and happy new year !

Your getFile() may return a file content or an object { content, extname }

src:

const res = await getFile(path);
const file = typeof res === 'object' ? res : { content: res, extname: Path.extname(path) };

doc: https://github.com/FranckFreiburger/vue3-sfc-loader/blob/1dee31300c675f2b232d825ed81fb2730aad0e90/docs/api/README.md#file

This can allow you to fetch any resource (maybe with hash) and set extname to the right extension.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by FranckFreiburger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants