diff --git a/packages/cli/src/config/rollup.config.js b/packages/cli/src/config/rollup.config.js index f65139773..785aa675f 100644 --- a/packages/cli/src/config/rollup.config.js +++ b/packages/cli/src/config/rollup.config.js @@ -162,9 +162,6 @@ function greenwoodHtmlPlugin(compilation) { } else { const { src } = parsedAttributes; - // TODO avoid using href and set it to the value of rollup fileName instead - // since user paths can still be the same file, - // e.g. ../theme.css and ./theme.css are still the same file mappedScripts.set(src, true); const srcPath = src.replace('../', './'); diff --git a/packages/cli/src/lib/router.js b/packages/cli/src/lib/router.js index 12ac91e80..31970d670 100644 --- a/packages/cli/src/lib/router.js +++ b/packages/cli/src/lib/router.js @@ -3,20 +3,16 @@ document.addEventListener('click', function(e) { e.preventDefault(); if (e.path[0].href) { - console.debug('linked clicked was...', e.path[0].href); const target = e.path[0]; const route = target.href.replace(window.location.origin, ''); const routerOutlet = Array.from(document.getElementsByTagName('greenwood-route')).filter(outlet => { return outlet.getAttribute('data-route') === route; })[0]; - console.debug('routerOutlet', routerOutlet); - if (routerOutlet.getAttribute('data-template') === window.__greenwood.currentTemplate) { window.__greenwood.currentTemplate = routerOutlet.getAttribute('data-template'); routerOutlet.loadRoute(); } else { - console.debug('new template detected, should do a hard reload'); window.location.href = target; } } @@ -26,8 +22,7 @@ class RouteComponent extends HTMLElement { loadRoute() { const route = this.getAttribute('data-route'); const key = this.getAttribute('data-key'); - console.debug('load route ->', route); - console.debug('with bundle ->', key); + fetch(key) .then(res => res.text()) .then((response) => { diff --git a/packages/cli/test/cases/build.config.optimization-default/src/pages/index.html b/packages/cli/test/cases/build.config.optimization-default/src/pages/index.html index 21b948d1b..57ef25887 100644 --- a/packages/cli/test/cases/build.config.optimization-default/src/pages/index.html +++ b/packages/cli/test/cases/build.config.optimization-default/src/pages/index.html @@ -2,7 +2,6 @@ - diff --git a/packages/cli/test/cases/build.config.optimization-inline/src/pages/index.html b/packages/cli/test/cases/build.config.optimization-inline/src/pages/index.html index 21b948d1b..57ef25887 100644 --- a/packages/cli/test/cases/build.config.optimization-inline/src/pages/index.html +++ b/packages/cli/test/cases/build.config.optimization-inline/src/pages/index.html @@ -2,7 +2,6 @@ - diff --git a/packages/cli/test/cases/build.config.optimization-none/src/pages/index.html b/packages/cli/test/cases/build.config.optimization-none/src/pages/index.html index 21b948d1b..57ef25887 100644 --- a/packages/cli/test/cases/build.config.optimization-none/src/pages/index.html +++ b/packages/cli/test/cases/build.config.optimization-none/src/pages/index.html @@ -2,7 +2,6 @@ - diff --git a/packages/cli/test/cases/build.config.optimization-static/src/pages/index.html b/packages/cli/test/cases/build.config.optimization-static/src/pages/index.html index 86d853701..44c18d455 100644 --- a/packages/cli/test/cases/build.config.optimization-static/src/pages/index.html +++ b/packages/cli/test/cases/build.config.optimization-static/src/pages/index.html @@ -2,7 +2,6 @@ -