Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed Jun 13, 2022
1 parent a782379 commit c9b185c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions playground/worker/my-worker.ts
Original file line number Diff line number Diff line change
@@ -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')
3 changes: 2 additions & 1 deletion playground/worker/vite.config-es.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ module.exports = vite.defineConfig({
}
}
}
]
],
cacheDir: 'node_modules/.vite/es'
})
3 changes: 2 additions & 1 deletion playground/worker/vite.config-relative-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ module.exports = vite.defineConfig({
}
}
}
]
],
cacheDir: 'node_modules/.vite/relative-base'
})
3 changes: 3 additions & 0 deletions playground/worker/vite.config-sourcemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion playground/worker/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ module.exports = vite.defineConfig({
entryFileNames: 'assets/[name].js'
}
}
}
},
cacheDir: 'node_modules/.vite/iife'
})

0 comments on commit c9b185c

Please sign in to comment.