Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #328 from sveltejs/export-no-minify-js
Browse files Browse the repository at this point in the history
don't minify JS when minifying HTML
  • Loading branch information
Rich-Harris authored Jul 31, 2018
2 parents e3ddbfc + c2b393d commit 2fca2e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/api/utils/minify_html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 2fca2e2

Please sign in to comment.