Message from worker: {{ res }}
+ + + diff --git a/playground/worker/worker.js b/playground/worker/worker.js new file mode 100644 index 00000000000000..a36e3e812a04ba --- /dev/null +++ b/playground/worker/worker.js @@ -0,0 +1,7 @@ +import { msg } from './workerImport' + +self.onmessage = (e) => { + if (e.data === 'ping') { + self.postMessage(msg) + } +} diff --git a/playground/worker/workerImport.js b/playground/worker/workerImport.js new file mode 100644 index 00000000000000..b06eff50b47ec6 --- /dev/null +++ b/playground/worker/workerImport.js @@ -0,0 +1 @@ +export const msg = 'pong' diff --git a/src/node/build/index.ts b/src/node/build/index.ts index 62a03f44864ab5..6ec83452f18a52 100644 --- a/src/node/build/index.ts +++ b/src/node/build/index.ts @@ -283,6 +283,14 @@ export async function build(options: BuildConfig): Promise