diff --git a/package.json b/package.json index cfd82d3dd..129711955 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "cheerio": "^1.0.0-rc.2", "chokidar": "^2.0.3", "cookie": "^0.3.1", - "devalue": "^1.0.1", + "devalue": "^1.0.4", "glob": "^7.1.2", "html-minifier": "^3.5.16", "mkdirp": "^0.5.1", diff --git a/src/api/utils/minify_html.ts b/src/api/utils/minify_html.ts index b675c1056..73581fa3f 100644 --- a/src/api/utils/minify_html.ts +++ b/src/api/utils/minify_html.ts @@ -8,7 +8,7 @@ export function minify_html(html: string) { decodeEntities: true, html5: true, minifyCSS: true, - minifyJS: true, + minifyJS: false, removeAttributeQuotes: true, removeComments: true, removeOptionalTags: true, diff --git a/src/middleware.ts b/src/middleware.ts index d764d429f..bb2d0da67 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -452,9 +452,9 @@ function get_page_handler(manifest: Manifest, store_getter: (req: Req) => Store) let inline_script = `__SAPPER__={${[ error && `error:1`, - `baseUrl: "${req.baseUrl}"`, - serialized.preloaded && `preloaded: ${serialized.preloaded}`, - serialized.store && `store: ${serialized.store}` + `baseUrl:"${req.baseUrl}"`, + serialized.preloaded && `preloaded:${serialized.preloaded}`, + serialized.store && `store:${serialized.store}` ].filter(Boolean).join(',')}};`; const has_service_worker = fs.existsSync(path.join(locations.dest(), 'service-worker.js'));