-
-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Description
Assuming we are in a svelte component and want to import other svelte components in a published package.
It would be nice if esm.sh can use the svelte entry of exports
{
"exports": {
".": {
"types": "./dist/index.d.ts",
"svelte": "./dist/index.js"
}
}
// ...
}example: https://app.unpkg.com/@onsvisual/[email protected]/files/package.json#L35
To allow usage like this:
https://onsdigital.github.io/svelte-components/?path=/docs/introduction--docs#using-the-components
<!-- +layout.svelte -->
<script>
import "@onsvisual/svelte-components/css/main.css";
</script>
<slot/>
<!-- +page.svelte / Component.svelte -->
<script>
import { Section } from "@onsvisual/svelte-components";
</script>
<Section title="Hello world!">I am using an ONS Svelte component.</Section>Metadata
Metadata
Assignees
Labels
No labels