From a648f3decd398996a2e241ab948643d0098ab82b Mon Sep 17 00:00:00 2001 From: typhonrt Date: Mon, 19 Jun 2023 10:37:59 -0700 Subject: [PATCH] switch to svelte-retag --- src/plugin/renderer/compile/compileNavBundle.js | 4 ++-- src/web-components/index.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugin/renderer/compile/compileNavBundle.js b/src/plugin/renderer/compile/compileNavBundle.js index 65cabec..b33db75 100644 --- a/src/plugin/renderer/compile/compileNavBundle.js +++ b/src/plugin/renderer/compile/compileNavBundle.js @@ -158,11 +158,11 @@ const navComponentScript = ` * @type {string} */ const indexJS = ` -import Component from 'svelte-tag'; +import svelteRetag from 'svelte-retag'; import NavigationSite from 'VirtualComponent.js'; -new Component({ +svelteRetag({ component: NavigationSite, tagname: 'wc-dmt-nav', attributes:['pageurl'], diff --git a/src/web-components/index.js b/src/web-components/index.js index 01053d0..aa3db0e 100644 --- a/src/web-components/index.js +++ b/src/web-components/index.js @@ -1,4 +1,4 @@ -import Component from 'svelte-tag'; +import svelteRetag from 'svelte-retag'; import WrapTest from './WrapTest.svelte'; @@ -7,11 +7,11 @@ import { scrollActivation } from './scrollActivation.js'; import './dmt-nav-web-component.js'; // Currently in Svelte v3 there is no standard way to create a Svelte based web component that doesn't use the shadow -// DOM. `svelte-tag` provides a workaround. This allows the Svelte components specified below to be loaded as custom +// DOM. `svelte-retag` provides a workaround. This allows the Svelte components specified below to be loaded as custom // elements and remain in the main document flow allowing styles and interactivity loaded from the `main.js` to take // effect. The good news is that Svelte v4 coming soon solves this issue! -new Component({ +svelteRetag({ component: WrapTest, tagname: 'wc-dmt-wrap', shadow: false