From 53ad8575608c0eb85bddf19349ebf83ea62f405b Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 12 Oct 2023 14:23:49 +0200 Subject: [PATCH 1/3] omitNestedClosingTags --- src/index.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 70891e4..fd4a49c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,12 +26,12 @@ export interface Options { * A [picomatch](https://github.com/micromatch/picomatch) pattern, or array of patterns, which specifies the files * the plugin should operate on. */ - include?: FilterPattern + include?: FilterPattern; /** * A [picomatch](https://github.com/micromatch/picomatch) pattern, or array of patterns, which specifies the files * to be ignored by the plugin. */ - exclude?: FilterPattern + exclude?: FilterPattern; /** * This will inject solid-js/dev in place of solid-js in dev mode. Has no * effect in prod. If set to `false`, it won't inject it in dev. This is @@ -47,6 +47,14 @@ export interface Options { * @default false */ ssr: boolean; + + /** + * Removed unnecessary closing tags from template strings. More info here: https://github.com/solidjs/solid/blob/main/CHANGELOG.md#smaller-templates + * + * @default false + */ + omitNestedClosingTags: boolean; + /** * This will inject HMR runtime in dev mode. Has no effect in prod. If * set to `false`, it won't inject the runtime in dev. @@ -280,7 +288,7 @@ function isJestDomInstalled() { } export default function solidPlugin(options: Partial = {}): Plugin { - const filter = createFilter(options.include, options.exclude) + const filter = createFilter(options.include, options.exclude); let needHmr = false; let replaceDev = false; From 5be91b28ab6414bd00215cd4a52101f0cebe3649 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 12 Oct 2023 15:23:15 +0200 Subject: [PATCH 2/3] newline --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index fd4a49c..f1d75b5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -49,7 +49,8 @@ export interface Options { ssr: boolean; /** - * Removed unnecessary closing tags from template strings. More info here: https://github.com/solidjs/solid/blob/main/CHANGELOG.md#smaller-templates + * Removed unnecessary closing tags from template strings. More info here: + * https://github.com/solidjs/solid/blob/main/CHANGELOG.md#smaller-templates * * @default false */ From 28ff5d5bea6d72f36fdf1fa88936b79bc37080f1 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 12 Oct 2023 18:19:50 +0200 Subject: [PATCH 3/3] move to solid prop --- src/index.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/index.ts b/src/index.ts index f1d75b5..284498d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -48,14 +48,6 @@ export interface Options { */ ssr: boolean; - /** - * Removed unnecessary closing tags from template strings. More info here: - * https://github.com/solidjs/solid/blob/main/CHANGELOG.md#smaller-templates - * - * @default false - */ - omitNestedClosingTags: boolean; - /** * This will inject HMR runtime in dev mode. Has no effect in prod. If * set to `false`, it won't inject the runtime in dev. @@ -206,6 +198,16 @@ export interface Options { * @default {} */ solid: { + + + /** + * Removed unnecessary closing tags from template strings. More info here: + * https://github.com/solidjs/solid/blob/main/CHANGELOG.md#smaller-templates + * + * @default false + */ + omitNestedClosingTags: boolean; + /** * The name of the runtime module to import the methods from. *