mirror of
https://github.com/hanzoai/vite.git
synced 2026-10-30 19:36:16 +00:00
12 lines
298 B
JavaScript
12 lines
298 B
JavaScript
let base = `/${self.location.pathname.split('/')[1]}`
|
|
if (base.endsWith('.js') || base === `/worker-entries`) base = '' // for dev
|
|
|
|
importScripts(`${base}/classic.js`)
|
|
|
|
self.addEventListener('message', () => {
|
|
self.postMessage(self.constant)
|
|
})
|
|
|
|
// for sourcemap
|
|
console.log("classic-worker.js")
|