like this ,
my vue project want to unzip some zipfile,
so import your 'libarchive.js' to do this,
but in the browser always thorw an error like Uncaught SyntaxError: Unexpected token '<',
there is my code:
Archive.init('../../node_modules/libarchive.js/dist/worker-bundle.js'); const archive = await Archive.open(zipFile); let obj = await archive.extractFiles(); console.log(obj);zipfile is my zipfile and init path is true or empty always throw this error.
my English is not good, washing your reply.
like this , my vue project want to unzip some zipfile, so import your 'libarchive.js' to do this, but in the browser always thorw an error like
Uncaught SyntaxError: Unexpected token '<'
, there is my code:Archive.init('../../node_modules/libarchive.js/dist/worker-bundle.js'); const archive = await Archive.open(zipFile); let obj = await archive.extractFiles(); console.log(obj);
zipfile
is my zipfile and init path is true or empty always throw this error. my English is not good, washing your reply.