This commit is contained in:
Rich Harris
2018-07-16 12:30:38 -04:00
parent 9c868f87a5
commit 64837ca8a6
4 changed files with 4 additions and 7 deletions

View File

@@ -1,9 +1,7 @@
import { init } from 'sapper/runtime.js';
import { routes } from './manifest/client.js';
import App from './App.html';
init({
target: document.querySelector('#sapper'),
routes,
App
routes
});

View File

@@ -3,13 +3,12 @@ import polka from 'polka';
import sapper from 'sapper';
import compression from 'compression';
import { routes } from './manifest/server.js';
import App from './App.html';
polka() // You can also use Express
.use(
compression({ threshold: 0 }),
sirv('assets'),
sapper({ routes, App })
sapper({ routes })
)
.listen(process.env.PORT)
.catch(err => {

View File

@@ -1 +1 @@
<svelte:component this={sapper.child} {...sapper.props}/>
<svelte:component this={child.component} {...child.props}/>

View File

@@ -1,7 +1,7 @@
<Nav {path}/>
<main>
<svelte:component this={sapper.child} {...sapper.props}/>
<svelte:component this={child.component} {...child.props}/>
</main>
<style>