From 1c9abb79de2fda701e2eb92331c7cef23ef45b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E6=99=BA=E5=8B=87?= Date: Fri, 26 Jul 2024 16:46:58 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20refactor:=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 2 +- vite.config.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9eecec4..9538795 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,7 @@ import ora from "ora" import { PluginOptions } from "./types" import { deleteFolderRecursive, log } from "./utils" -export default function VitePluginClean(options: PluginOptions = {}): Plugin { +export default function VitePluginCleaned(options: PluginOptions = {}): Plugin { const { folder = "dist", hooks = {} } = options if (typeof folder !== "string" && !Array.isArray(folder)) { throw new Error( diff --git a/vite.config.ts b/vite.config.ts index b654f3c..13683fa 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,13 +1,13 @@ import { defineConfig } from "vite" import path from "path" import dts from "vite-plugin-dts" -import vitePluginClean from "./src/index" +import VitePluginCleaned from "./src/index" import { nodePolyfills } from "vite-plugin-node-polyfills" export default defineConfig({ plugins: [ - vitePluginClean({ + VitePluginCleaned({ folder: ["dist", "dist-types"], }), dts({