avif.js icon indicating copy to clipboard operation
avif.js copied to clipboard

Vue support

Open darkcharmander opened this issue 3 years ago • 3 comments

I am using Vue for my website, and I cannot get this polyfill to work.

When using the require/register method in the Readme, Edge will complain with the following error (On localhost):

An SSL certificate error occurred when fetching the script. Which is strange, because the website works fine. The certificate is self-signed, but it is accepted.

When directly importing the files like this:

import 'avif.js/avif.js';
import 'avif.js/avif-sw.js';

Nothing happens. Safari on iOS doesn't seem to do anything in the above scenarios. I cannot debug on desktop Safari, because I haven no more mac OS devices.

Not that it's of much value, but Firefox and Chrome both don't work. On Firefox it's because of the ServiceWorker being unsupported, I believe that this is a known issue.

Does anyone know how to get this working in Vue? I would love AVIF support in browsers which do not support it!

darkcharmander avatar Oct 01 '20 08:10 darkcharmander

A detailed example can be found here: https://github.com/Kagami/avif.js/issues/7#issuecomment-1312853028 cc @langyo

n0099 avatar Nov 13 '22 23:11 n0099

I believe that's not related to Vue. Check your translater and packager first(eg. Webpack, Babel).

langyo avatar Nov 14 '22 09:11 langyo

Thanks for your help, but this issue is no longer relevant for me. Moderators may close it.

darkcharmander avatar Nov 14 '22 12:11 darkcharmander