Package Exports
- svelte-dev-helper
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (svelte-dev-helper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
svelte-dev-helper
Helper for svelte components to ease development
##Usage
This is meant to be used under the hood for creating a build toolchain, or a dev helper based on Svelte components;
import {Registry, configure, createProxy} from 'svelte-dev-helper';
import Component from './Component.html'; //some svelte component
configure(configOptions);
const id = someUniqueID();
Registry.set(id, {
component: Component,
instances:[]
});
export createProxy(id);
The component returned by createProxy now does the following
- Add a
<!--<Component>-->comment marker in the DOM just above where the component's DOM starts - You can access the component instance using
$0.__component__in devtools after higlighting the comment marker from above.