mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-20 21:45:10 +00:00
updates
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
import { init } from 'sapper/runtime.js';
|
import { init } from 'sapper/runtime.js';
|
||||||
import { routes } from './manifest/client.js';
|
import { routes } from './manifest/client.js';
|
||||||
import App from './App.html';
|
|
||||||
|
|
||||||
init({
|
init({
|
||||||
target: document.querySelector('#sapper'),
|
target: document.querySelector('#sapper'),
|
||||||
routes,
|
routes
|
||||||
App
|
|
||||||
});
|
});
|
||||||
@@ -3,13 +3,12 @@ import polka from 'polka';
|
|||||||
import sapper from 'sapper';
|
import sapper from 'sapper';
|
||||||
import compression from 'compression';
|
import compression from 'compression';
|
||||||
import { routes } from './manifest/server.js';
|
import { routes } from './manifest/server.js';
|
||||||
import App from './App.html';
|
|
||||||
|
|
||||||
polka() // You can also use Express
|
polka() // You can also use Express
|
||||||
.use(
|
.use(
|
||||||
compression({ threshold: 0 }),
|
compression({ threshold: 0 }),
|
||||||
sirv('assets'),
|
sirv('assets'),
|
||||||
sapper({ routes, App })
|
sapper({ routes })
|
||||||
)
|
)
|
||||||
.listen(process.env.PORT)
|
.listen(process.env.PORT)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<svelte:component this={sapper.child} {...sapper.props}/>
|
<svelte:component this={child.component} {...child.props}/>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<Nav {path}/>
|
<Nav {path}/>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<svelte:component this={sapper.child} {...sapper.props}/>
|
<svelte:component this={child.component} {...child.props}/>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in New Issue
Block a user