diff --git a/CHANGELOG.md b/CHANGELOG.md index bd98d2a..39fb9b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # sapper changelog +## 0.15.1 + +* Prevent confusing error when no root layout is specified + ## 0.15.0 * Nested routes (consult [migration guide](https://sapper.svelte.technology/guide#0-14-to-0-15) and docs on [layouts](https://sapper.svelte.technology/guide#layouts)) ([#262](https://github.com/sveltejs/sapper/issues/262)) diff --git a/package.json b/package.json index 3372255..7abbf66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sapper", - "version": "0.15.0", + "version": "0.15.1", "description": "Military-grade apps, engineered by Svelte", "main": "dist/middleware.ts.js", "bin": { diff --git a/src/core/create_manifests.ts b/src/core/create_manifests.ts index a1dc261..be6990d 100644 --- a/src/core/create_manifests.ts +++ b/src/core/create_manifests.ts @@ -62,7 +62,7 @@ function generate_client( let code = ` // This file is generated by Sapper — do not edit it! - import root from '${posixify(`${path_to_routes}/${routes.root.file}`)}'; + import root from '${get_file(path_to_routes, routes.root)}'; import error from '${posixify(`${path_to_routes}/_error.html`)}'; ${routes.components.map(component => @@ -124,7 +124,7 @@ function generate_server( `import * as ${route.name} from '${posixify(`${path_to_routes}/${route.file}`)}';`), routes.components.map(component => `import ${component.name} from '${get_file(path_to_routes, component)}';`), - `import root from '${posixify(`${path_to_routes}/${routes.root.file}`)}';`, + `import root from '${get_file(path_to_routes, routes.root)}';`, `import error from '${posixify(`${path_to_routes}/_error.html`)}';` );