Closed maximdeclercq closed 3 years ago
for the record
Look at https://github.com/FranckFreiburger/vue3-sfc-loader/blob/main/docs/interfaces/options.md#getfile
You can define options.getFile()
like this:
getFile(url) {
if ( url === 'MY_ID' )
return Promise.resolve(theComponentString);
return fetch(url).then(response => response.ok ? response.text() : Promise.reject(response));
},
Fixes #2