From 2e6f47d1e4f26ba81f2ea3a2d02cec42261bf8a5 Mon Sep 17 00:00:00 2001 From: okadurin Date: Mon, 6 Nov 2023 14:04:28 +0100 Subject: [PATCH] chore: add scoped-custom-element-registry.min.js --- README.md | 8 +------- src/pages/[top]/[...slug].astro | 2 ++ src/pages/components/[component].astro | 3 +++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a42df24f99..2ec7a90b57 100644 --- a/README.md +++ b/README.md @@ -72,13 +72,7 @@ Keep using `/docs` on the root level as we used it in the `master` branch. The d Cannot find module 'import.meta' ``` -- Visit [accordion page]. There is an error in the browser console: - - ``` - You are trying to re-register the "lion-accordion" custom element with a different class via ScopedElementsMixin - ``` - -- Fiex the browser console error on [collapsible page](http://localhost:4322/components/collapsible): +- Fix the browser console error on [collapsible page](http://localhost:4322/components/collapsible): ``` __mdjs-stories--use-cases.js:40 Uncaught TypeError: shadowRoot.getElementById is not a function diff --git a/src/pages/[top]/[...slug].astro b/src/pages/[top]/[...slug].astro index d1d4faf454..10b2567e66 100644 --- a/src/pages/[top]/[...slug].astro +++ b/src/pages/[top]/[...slug].astro @@ -43,6 +43,7 @@ const getPathMdjsStroriesFile = (entry) => { const mdjsStroriesFileDirectory = path.dirname(entry.slug); return `/public/docs/${mdjsStroriesFileDirectory}/__mdjs-stories.js`; } +const getScopedCustomElementRegistryFilePath = () => '/docs/_assets/scoped-custom-element-registry.min.js'; --- @@ -52,5 +53,6 @@ const getPathMdjsStroriesFile = (entry) => { {blogData.tags} {blogData.author} + diff --git a/src/pages/components/[component].astro b/src/pages/components/[component].astro index c6769aa30a..1f25126be9 100644 --- a/src/pages/components/[component].astro +++ b/src/pages/components/[component].astro @@ -44,6 +44,8 @@ const getPathMdjsStroriesFile = (entry) => { const mdjsStroriesFileDirectory = path.dirname(entry.slug); return `/public/docs/${mdjsStroriesFileDirectory}/__mdjs-stories.js`; } + +const getScopedCustomElementRegistryFilePath = () => '/docs/_assets/scoped-custom-element-registry.min.js'; --- @@ -54,6 +56,7 @@ const getPathMdjsStroriesFile = (entry) => { )) } +