How to build the project with vue.js? #290
-
my problem: importing zip.js, an error occurred while compiling Vue project 一、 import * as zip from "@zip.js/zip.js";
hello
<script>
import * as zip from "@zip.js/zip.js";
export default {
name: 'HelloWorld',
props: {
msg: String
},
mounted() {
zip.configure({
useWebWorkers: false
});
console.log(zip)
}
}
</script>
二、 vue.config.js 三、compile project
WARN A new version of sass-loader is available. Please upgrade for best experience. ERROR Failed to compile with 1 error 11:01:56 AM Syntax Error: Thread Loader (Worker 0) You may use special comments to disable some warnings. anyone knows .....??? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I guess that even though you don't use web workers, you have to include the plugin to build the project anyway. This article explains how to install and configure the plugin |
Beta Was this translation helpful? Give feedback.
I guess that even though you don't use web workers, you have to include the plugin to build the project anyway. This article explains how to install and configure the plugin
worker-plugin
: https://braincoke.fr/blog/2020/03/use-web-workers-with-vue/#worker-plugin.