diff --git a/bin/build-inline-script.js b/bin/build-inline-script.js index b2cb3f2..d67c951 100644 --- a/bin/build-inline-script.js +++ b/bin/build-inline-script.js @@ -28,11 +28,13 @@ export async function buildInlineScript () { }) ] }) - let { code, map } = await bundle.generate({ + let { output } = await bundle.generate({ format: 'iife', sourcemap: true }) + let { code, map } = output[0] + let fullCode = `${code}//# sourceMappingURL=/inline-script.js.map` let checksum = crypto.createHash('sha256').update(fullCode).digest('base64') diff --git a/package-lock.json b/package-lock.json index 6e7189f..0a137b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7997,12 +7997,20 @@ } }, "rollup": { - "version": "0.68.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.68.0.tgz", - "integrity": "sha512-UbmntCf8QBlOqJnwsNWQCI0oonHOgs9y1OLoO8BHf2r8gCyRLp3JzLHXARJpsNDAS08Qm3LDjzyWma5sqnCxDQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.0.0.tgz", + "integrity": "sha512-LV6Qz+RkuDAfxr9YopU4k5o5P/QA7YNq9xi2Ug2IqOmhPt9sAm89vh3SkNtFok3bqZHX54eMJZ8F68HPejgqtw==", "requires": { "@types/estree": "0.0.39", - "@types/node": "*" + "@types/node": "*", + "acorn": "^6.0.4" + }, + "dependencies": { + "acorn": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", + "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==" + } } }, "rollup-plugin-replace": { diff --git a/package.json b/package.json index 5d2e376..4fe1ccc 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "quick-lru": "^2.0.0", "remount": "^0.9.3", "requestidlecallback": "^0.3.0", - "rollup": "^0.68.0", + "rollup": "^1.0.0", "rollup-plugin-replace": "^2.1.0", "rollup-plugin-terser": "^3.0.0", "sapper": "github:nolanlawson/sapper#nolan/sw-index-html-built",