From 41f72af999b138dc8987f8dd5bdcdfe8946bfea1 Mon Sep 17 00:00:00 2001 From: Guz013 <43732358+Guz013@users.noreply.github.com> Date: Mon, 19 Jun 2023 14:48:48 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20unplugin-svelte-component?= =?UTF-8?q?s=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/www/vite.config.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/www/vite.config.ts b/apps/www/vite.config.ts index 6062f69..ef39c44 100644 --- a/apps/www/vite.config.ts +++ b/apps/www/vite.config.ts @@ -14,8 +14,7 @@ export default defineConfig({ plugins: [ SvelteImport({ include: [ - /\.svelte/, - /\.svelte\?svelte/, + /\.svelte$/, ], external: [ ...findPathsByExtension(path.join(__dirname, 'src'), '.svx').map((filePath) => { @@ -47,21 +46,18 @@ export default defineConfig({ }), ], dirs: [ - './src/**/*', + './src/lib', ], importPathTransform: (importPath) => { if (path.extname(importPath) === '.svg') return `${importPath}?component`; - if (getFileName(importPath).startsWith('+')) - return ''; else return importPath; }, dts: './src/lib/components.d.ts', }), AutoImport({ include: [ - /\.svelte/, - /\.svelte\?svelte/, + /\.svelte$/, /.[tj]sx?$/, ], imports: [