From f3b10b55195fbff96d74a96ae69632cc9f55b6ba Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 2 Oct 2021 11:21:14 +0200 Subject: [PATCH] :fire: Remove config merging (fix #20) --- playground/vite.config.js | 13 +++++++++++++ src/index.ts | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/playground/vite.config.js b/playground/vite.config.js index 83811ac..dea599f 100644 --- a/playground/vite.config.js +++ b/playground/vite.config.js @@ -1,6 +1,18 @@ import solid from 'vite-plugin-solid'; import { defineConfig } from 'vite'; +/** + * @returns {import('vite').Plugin} + */ +const logPlugin = () => { + return { + name: 'looog', + configResolved(config) { + console.log({ alias: config.resolve.alias }); + }, + }; +}; + export default defineConfig({ plugins: [ solid({ @@ -8,6 +20,7 @@ export default defineConfig({ plugins: ['@babel/plugin-syntax-top-level-await'], }, }), + logPlugin(), ], resolve: { alias: { diff --git a/src/index.ts b/src/index.ts index a517277..8c37621 100644 --- a/src/index.ts +++ b/src/index.ts @@ -136,7 +136,7 @@ export default function solidPlugin(options: Partial = {}): Plugin { 'solid-js/h', ]; - return mergeAndConcat(userConfig, { + return { /** * We only need esbuild on .ts or .js files. * .tsx & .jsx files are handled by us @@ -150,7 +150,7 @@ export default function solidPlugin(options: Partial = {}): Plugin { optimizeDeps: { include: nestedDeps, }, - }) as UserConfig; + } as UserConfig; }, configResolved(config) {