From 3b038bf2e156d105c09e5a4ab50d6fa34c2280c7 Mon Sep 17 00:00:00 2001 From: Xmader Date: Sun, 1 Dec 2019 16:45:38 -0500 Subject: [PATCH] include worker --- package.json | 1 - rollup.config.js | 15 ++++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 3897bcc..85ba9bc 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/rollup.config.js b/rollup.config.js index ec3e643..058a094 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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, }, ]