Created by: Krivega
Closes #3660
I used to test a simple example of the test plugin
// index.js
const worker = new Worker('./worker', { type: 'module' });
worker.onmessage = ({ data }) => {
console.log('page got data: ', data);
};
worker.postMessage('hello');
// worker.js
import { foo } from './dep';
console.log('hello from worker');
addEventListener('message', ({ data }) => {
console.log('worker got message', data);
if (data === 'hello') {
postMessage(foo);
}
});
// deep.js
export const foo = 'bar';