diff --git a/templates/main.js b/templates/main.js index 09cff6f..da7a7e2 100644 --- a/templates/main.js +++ b/templates/main.js @@ -1,4 +1,4 @@ -import app from 'sapper/runtime/app.js'; +import app from '__app__'; import { detachNode } from 'svelte/shared.js'; const target = document.querySelector('__selector__'); diff --git a/utils/create_app.js b/utils/create_app.js index dd4078c..854b49f 100644 --- a/utils/create_app.js +++ b/utils/create_app.js @@ -34,6 +34,7 @@ module.exports = function create_app(src, dest, routes, options) { .join(' else ') + ' else return false;'; const main = template + .replace('__app__', path.resolve(__dirname, '../runtime/app.js')) .replace('__selector__', options.selector || 'main') .replace('// ROUTES', code);