Source widget does not import depedencies from other imported files. #19

Open
opened 2024-05-10 14:45:23 +00:00 by xrdawson · 0 comments
xrdawson commented 2024-05-10 14:45:23 +00:00 (Migrated from extrastatic.dev)

If you have a markdown file like this:

---
published: true
title: "hello"
---

Hi there.

<SvelteComponent/>

<script>
import SvelteComponent from './SvelteComponent.svelte';
</script>

The view source will pull in the SvelteComponent. But, if the SvelteComponent pulls in other svelte components, those are not imported correctly, and not shown in the view source dialog. A hack until this is fixed is to import the unused component in your markdown. It will be ignored when compiled, but the source adder will put it into the list to be included and your users can see it.

If you have a markdown file like this: ``` --- published: true title: "hello" --- Hi there. <SvelteComponent/> <script> import SvelteComponent from './SvelteComponent.svelte'; </script> ``` The view source will pull in the SvelteComponent. But, if the SvelteComponent pulls in other svelte components, those are not imported correctly, and not shown in the view source dialog. A hack until this is fixed is to import the unused component in your markdown. It will be ignored when compiled, but the source adder will put it into the list to be included and your users can see it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
svekyll/svekyll-cli#19
No description provided.