Small refactor
This commit is contained in:
parent
86883fcf71
commit
27fc6a766e
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ export function init() {
|
|||
[file: string]: string;
|
||||
}, options?: MinifyOptions): Promise<MinifyOutput> {
|
||||
|
||||
if (!!window.SharedWorker) {
|
||||
if (is_browser && !!window.SharedWorker) {
|
||||
if (!worker) {
|
||||
worker = new SharedWorker(new URL('./terserWorker.ts', import.meta.url), { type: "module" })
|
||||
worker.port.onmessage = (e: MessageEvent<any>) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue