Skip to content

Commit

Permalink
fix: proper string
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Jan 1, 2022
1 parent 102db65 commit 336f3fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/kit/src/core/build/build_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import { s } from '../../utils/misc.js';
* runtime: string,
* hooks: string,
* config: import('types/config').ValidatedConfig,
* service_worker: string | null
* has_service_worker: boolean
* }} opts
* @returns
*/
const template = ({ config, hooks, runtime, service_worker }) => `
const template = ({ config, hooks, runtime, has_service_worker }) => `
import { respond } from '${runtime}';
import root from './generated/root.svelte';
import { set_paths, assets, base } from './runtime/paths.js';
Expand Down Expand Up @@ -74,7 +74,7 @@ export class App {
prerender: ${config.kit.prerender.enabled},
read,
root,
service_worker: ${JSON.stringify(service_worker)},
service_worker: ${has_service_worker ? "'/service-worker.js'" : 'null'},
router: ${s(config.kit.router)},
ssr: ${s(config.kit.ssr)},
target: ${s(config.kit.target)},
Expand Down Expand Up @@ -182,7 +182,7 @@ export async function build_server(
config,
hooks: app_relative(hooks_file),
runtime,
service_worker: service_worker_register ? service_worker_entry_file : null
has_service_worker: service_worker_register && !!service_worker_entry_file
})
);

Expand Down

0 comments on commit 336f3fb

Please sign in to comment.