From 36bb0ee304e3964e6a9317c8e1332a7606be8812 Mon Sep 17 00:00:00 2001 From: "Hung-Han (Henry) Chen" Date: Sun, 7 Jan 2024 20:05:34 +0200 Subject: [PATCH] fix: fix build by removing defineConfig Signed-off-by: Hung-Han (Henry) Chen --- src/index.ts | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/index.ts b/src/index.ts index 457c100..d2a8eb9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,15 +1,12 @@ -import { - defineConfig, - type Logger, - type Plugin, - type ResolvedConfig, -} from "vite"; +import { type Logger, type Plugin, type ResolvedConfig } from "vite"; import { $ } from "execa"; import fs from "fs-extra"; import path from "path"; import { load as jsTomlLoad } from "js-toml"; -function vitePluginTrunk(vitePluginTruckConfig?: { debug?: boolean }): Plugin { +export function vitePluginTrunk(vitePluginTruckConfig?: { + debug?: boolean; +}): Plugin { let config: ResolvedConfig; let logger: Logger; const name = "vite-plugin-trunk"; @@ -257,13 +254,10 @@ function vitePluginTrunk(vitePluginTruckConfig?: { debug?: boolean }): Plugin { `${config.build.outDir}/${jsFile.name}`, ); } - logger.info(`🦀 trunk successfully built wasm modules`, { timestamp: true }); + logger.info(`🦀 trunk successfully built wasm modules`, { + timestamp: true, + }); } }, }; } - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [vitePluginTrunk()], -});