mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-20 13:35:11 +00:00
26
app/App.html
26
app/App.html
@@ -1,26 +0,0 @@
|
||||
<Nav path={props.path}/>
|
||||
|
||||
<main>
|
||||
<svelte:component this={Page} {...props}/>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
main {
|
||||
position: relative;
|
||||
max-width: 56em;
|
||||
background-color: white;
|
||||
padding: 2em;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import Nav from '../components/Nav.html';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Nav
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,9 +1,7 @@
|
||||
import { init } from 'sapper/runtime.js';
|
||||
import { routes } from './manifest/client.js';
|
||||
import App from './App.html';
|
||||
import { manifest } from './manifest/client.js';
|
||||
|
||||
init({
|
||||
target: document.querySelector('#sapper'),
|
||||
routes,
|
||||
App
|
||||
manifest
|
||||
});
|
||||
@@ -2,14 +2,13 @@ import sirv from 'sirv';
|
||||
import polka from 'polka';
|
||||
import sapper from 'sapper';
|
||||
import compression from 'compression';
|
||||
import { routes } from './manifest/server.js';
|
||||
import App from './App.html';
|
||||
import { manifest } from './manifest/server.js';
|
||||
|
||||
polka() // You can also use Express
|
||||
.use(
|
||||
compression({ threshold: 0 }),
|
||||
sirv('assets'),
|
||||
sapper({ routes, App })
|
||||
sapper({ manifest })
|
||||
)
|
||||
.listen(process.env.PORT)
|
||||
.catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user