From b188d24fd3e882740986290051edfe3df7660481 Mon Sep 17 00:00:00 2001 From: Carlos Edinson Roso Espinosa Date: Fri, 24 Jul 2020 16:11:38 -0500 Subject: [PATCH 1/2] add customElement typings --- index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.d.ts b/index.d.ts index a139f8c..2947cb9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -73,6 +73,13 @@ interface Options { */ css?: (css: CssWriter) => any; + + /** + * Compile Svelte components to custom elements (aka web components). + * @default false + */ + customElement?: boolean; + /** * let Rollup handle all other warnings normally */ From 0d0eb6595d791662fbeee46c337e2303c9c23bef Mon Sep 17 00:00:00 2001 From: Carlos Edinson Roso Espinosa Date: Fri, 24 Jul 2020 16:16:58 -0500 Subject: [PATCH 2/2] add snippet in readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5755824..213fca1 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ export default { // Emit CSS as "files" for other plugins to process emitCss: true, + // You can optionally set 'customElement' to 'true' to compile + // your components to custom elements (aka web elements) + customElement: false, + // Extract CSS into a separate file (recommended). // See note below css: function (css) {