vue-worker
vue-worker copied to clipboard
Uncaught ReferenceError: xxx is not defined
// worker.js
const add = (a, b) => {
return a + b
}
export const testfun = (a, b) => {
return add(a, b)
}
import { testfun } from './worker.js';
const r = await this..$worker.run(testfun, [1,2]);
I get this:
Uncaught ReferenceError: add is not defined
I have the same problem with you, have you solved this problem?
// worker.js const add = (a, b) => { return a + b } export const testfun = (a, b) => { return add(a, b) }
import { testfun } from './worker.js'; const r = await this..$worker.run(testfun, [1,2]);
I get this:
Uncaught ReferenceError: add is not defined
have you checked without add()
that is also not working ?
export const testfun = (a, b) => {
return (a+b);
}