github FranckFreiburger/vue3-sfc-loader v0.8.0

latest releases: v0.9.5, v0.9.4, v0.9.3...
2 years ago

breaking changes:

getFile() will continue to support a simple string as return value but the object form is now { type, getContentData } instead of { type, content }

This mean that, since v0.8.0, and only if your options.getFile returns an object, then you have to use :

      async getFile(url) {
        
        const res = await fetch(url);
        if ( !res.ok )
          throw Object.assign(new Error(res.statusText + ' ' + url), { res });

        return {
          getContentData: asBinary => asBinary ? res.arrayBuffer() : res.text(),
        }
      },

instead of

      async getFile(url) {
        
        const res = await fetch(url);
        if ( !res.ok )
          throw Object.assign(new Error(res.statusText + ' ' + url), { res });

        return await res.text();
      },

for more details, see CHANGELOG.md

Don't miss a new vue3-sfc-loader release

NewReleases is sending notifications on new releases.