mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-23 23:51:23 +00:00
named exports, for tree-shakeability when we add new stuff
This commit is contained in:
@@ -2,7 +2,7 @@ const detach = node => {
|
||||
node.parentNode.removeChild(node);
|
||||
};
|
||||
|
||||
let component;
|
||||
export let component;
|
||||
let target;
|
||||
let routes;
|
||||
|
||||
@@ -158,8 +158,7 @@ function findAnchor(node) {
|
||||
|
||||
let inited;
|
||||
|
||||
const app = {
|
||||
init(_target, _routes) {
|
||||
export function init(_target, _routes) {
|
||||
target = _target;
|
||||
routes = _routes;
|
||||
|
||||
@@ -179,7 +178,6 @@ const app = {
|
||||
history.replaceState({ id: uid }, '', window.location.href);
|
||||
navigate(new URL(window.location), uid);
|
||||
}
|
||||
};
|
||||
|
||||
function which(event) {
|
||||
event = event || window.event;
|
||||
@@ -192,5 +190,3 @@ function scroll_state() {
|
||||
y: window.scrollY
|
||||
};
|
||||
}
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user