fix for Greasemonkey
This commit is contained in:
parent
4a54512ab2
commit
14be1efde0
1 changed files with 3 additions and 3 deletions
|
@ -62,9 +62,8 @@ export default [
|
||||||
output: {
|
output: {
|
||||||
file: "dist/cache/worker.js",
|
file: "dist/cache/worker.js",
|
||||||
format: "iife",
|
format: "iife",
|
||||||
name: "Worker",
|
|
||||||
banner: "export const PDFWorker = function () { ",
|
banner: "export const PDFWorker = function () { ",
|
||||||
footer: "return Worker\n}\n",
|
footer: "}\n",
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
},
|
},
|
||||||
plugins,
|
plugins,
|
||||||
|
@ -76,7 +75,8 @@ export default [
|
||||||
format: "iife",
|
format: "iife",
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
banner: getBannerText,
|
banner: getBannerText,
|
||||||
// intro: "const global = typeof window === 'object' && window.window === window ? window : typeof self === 'object' && self.self === self ? self : typeof commonjsGlobal === 'object' && commonjsGlobal.global === commonjsGlobal ? commonjsGlobal : void 0"
|
intro: "// fix for Greasemonkey\nwindow.eval('(' + function () {",
|
||||||
|
outro: "}.toString() + ')()')"
|
||||||
},
|
},
|
||||||
plugins,
|
plugins,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue