mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-12 02:15:17 +00:00
updates
This commit is contained in:
@@ -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
|
||||
});
|
||||
@@ -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 => {
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svelte:component this={sapper.child} {...sapper.props}/>
|
||||
<svelte:component this={child.component} {...child.props}/>
|
||||
@@ -1,7 +1,7 @@
|
||||
<Nav {path}/>
|
||||
|
||||
<main>
|
||||
<svelte:component this={sapper.child} {...sapper.props}/>
|
||||
<svelte:component this={child.component} {...child.props}/>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user