diff --git a/playground/worker/my-worker.ts b/playground/worker/my-worker.ts index f98037f3065e5b..8c91d49d70ba5c 100644 --- a/playground/worker/my-worker.ts +++ b/playground/worker/my-worker.ts @@ -1,13 +1,13 @@ import { mode, msg } from './modules/workerImport' import { bundleWithPlugin } from './modules/test-plugin' -// import { msg as msgFromDep } from 'dep-to-optimize' +import { msg as msgFromDep } from 'dep-to-optimize' self.onmessage = (e) => { if (e.data === 'ping') { - self.postMessage({ msg, mode, bundleWithPlugin }) // TODO: fix darwin, and add back: msgFromDep }) + self.postMessage({ msg, mode, bundleWithPlugin }) } } -self.postMessage({ msg, mode, bundleWithPlugin }) +self.postMessage({ msg, mode, bundleWithPlugin, msgFromDep }) // for sourcemap console.log('my-worker.js') diff --git a/playground/worker/vite.config-es.js b/playground/worker/vite.config-es.js index 6d6704de0bc213..0d28d241ca8d42 100644 --- a/playground/worker/vite.config-es.js +++ b/playground/worker/vite.config-es.js @@ -38,5 +38,6 @@ module.exports = vite.defineConfig({ } } } - ] + ], + cacheDir: 'node_modules/.vite/es' }) diff --git a/playground/worker/vite.config-relative-base.js b/playground/worker/vite.config-relative-base.js index 8002883ca4abf1..64c2b7983fb527 100644 --- a/playground/worker/vite.config-relative-base.js +++ b/playground/worker/vite.config-relative-base.js @@ -40,5 +40,6 @@ module.exports = vite.defineConfig({ } } } - ] + ], + cacheDir: 'node_modules/.vite/relative-base' }) diff --git a/playground/worker/vite.config-sourcemap.js b/playground/worker/vite.config-sourcemap.js index c4cf61f6dea586..a84d8e6699af14 100644 --- a/playground/worker/vite.config-sourcemap.js +++ b/playground/worker/vite.config-sourcemap.js @@ -21,6 +21,9 @@ module.exports = vite.defineConfig((sourcemap) => { } } }, + cacheDir: `node_modules/.vite/iife-${ + typeof sourcemap === 'boolean' ? 'sourcemap' : 'sourcemap-' + sourcemap + }`, build: { outDir: `dist/iife-${ typeof sourcemap === 'boolean' ? 'sourcemap' : 'sourcemap-' + sourcemap diff --git a/playground/worker/vite.config.js b/playground/worker/vite.config.js index d62d6c4f6d6d36..f937372c6e0012 100644 --- a/playground/worker/vite.config.js +++ b/playground/worker/vite.config.js @@ -23,5 +23,6 @@ module.exports = vite.defineConfig({ entryFileNames: 'assets/[name].js' } } - } + }, + cacheDir: 'node_modules/.vite/iife' })