From 0cdac56def31be862b098613e5c2fedbf8db77ca Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Sat, 3 Feb 2024 17:19:20 +0800 Subject: [PATCH] Fix syntax support --- src/index.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 8a9c732..2d1faec 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,8 +6,8 @@ import { createRequire } from 'module'; import solidRefresh from 'solid-refresh/babel'; // TODO use proper path import type { Options as RefreshOptions } from 'solid-refresh/babel'; +import type { Alias, AliasOptions, FilterPattern, Plugin } from 'vite'; import { createFilter } from 'vite'; -import type { Alias, AliasOptions, Plugin, FilterPattern } from 'vite'; import { crawlFrameworkPkgs } from 'vitefu'; const require = createRequire(import.meta.url); @@ -312,7 +312,19 @@ export default function solidPlugin(options: Partial = {}): Plugin { return extensionOptions.typescript; }); - const plugins: NonNullable['plugins']> = ['jsx'] + const plugins: NonNullable['plugins']> = [ + 'jsx', + // import { example } from 'example' with { example: true }; + 'importAttributes', + // () => throw example + 'throwExpressions', + // You know what this is + 'decorators', + // const { #example: example } = this; + 'destructuringPrivate', + // using example = myExample() + 'explicitResourceManagement', + ]; if (shouldBeProcessedWithTypescript) { plugins.push('typescript');