include worker
This commit is contained in:
parent
6ba6136c23
commit
3b038bf2e1
2 changed files with 4 additions and 12 deletions
|
@ -21,7 +21,6 @@
|
|||
"@types/pdfkit": "^0.10.4",
|
||||
"rollup": "^1.26.3",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
"rollup-plugin-multi-entry": "^2.1.0",
|
||||
"rollup-plugin-node-builtins": "^2.1.2",
|
||||
"rollup-plugin-node-globals": "^1.4.0",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
|
|
|
@ -5,7 +5,6 @@ import builtins from "rollup-plugin-node-builtins"
|
|||
import nodeGlobals from "rollup-plugin-node-globals"
|
||||
import json from "@rollup/plugin-json"
|
||||
import fs from "fs"
|
||||
import multiEntry from "rollup-plugin-multi-entry"
|
||||
|
||||
const getBannerText = () => {
|
||||
const packageJson = JSON.parse(fs.readFileSync("./package.json", "utf-8"))
|
||||
|
@ -64,17 +63,14 @@ export default [
|
|||
file: "dist/cache/worker.js",
|
||||
format: "iife",
|
||||
name: "Worker",
|
||||
banner: "var PDFWorker = function () { ",
|
||||
footer: "return Worker\n}",
|
||||
banner: "export const PDFWorker = function () { ",
|
||||
footer: "return Worker\n}\n",
|
||||
sourcemap: false,
|
||||
},
|
||||
plugins,
|
||||
},
|
||||
{
|
||||
input: [
|
||||
"dist/cache/worker.js",
|
||||
"src/main.ts",
|
||||
],
|
||||
input: "src/main.ts",
|
||||
output: {
|
||||
file: "dist/main.js",
|
||||
format: "iife",
|
||||
|
@ -82,9 +78,6 @@ export default [
|
|||
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"
|
||||
},
|
||||
plugins:[
|
||||
...plugins,
|
||||
multiEntry({ exports: false }),
|
||||
],
|
||||
plugins,
|
||||
},
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue