From 361ab96627e237d6def822247851aedd09f258d5 Mon Sep 17 00:00:00 2001 From: zhangtao25 Date: Mon, 25 Nov 2024 11:27:43 +0800 Subject: [PATCH] feat: update --- plugins/vite-plugin-canyon/package.json | 2 +- plugins/vite-plugin-canyon/src/index.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/vite-plugin-canyon/package.json b/plugins/vite-plugin-canyon/package.json index a5db418c..a0bde1eb 100644 --- a/plugins/vite-plugin-canyon/package.json +++ b/plugins/vite-plugin-canyon/package.json @@ -1,6 +1,6 @@ { "name": "vite-plugin-canyon", - "version": "0.0.1-alpha.14", + "version": "0.0.1-alpha.15", "license": "MIT", "files": [ "dist/*" diff --git a/plugins/vite-plugin-canyon/src/index.ts b/plugins/vite-plugin-canyon/src/index.ts index be6cae25..b70dcbab 100644 --- a/plugins/vite-plugin-canyon/src/index.ts +++ b/plugins/vite-plugin-canyon/src/index.ts @@ -24,6 +24,9 @@ function resolveFilename(id: string): string { } function shouldInstrument(filename: string) { + if (filename.includes('node_modules')) { + return false; + } return DEFAULT_EXTENSION.some(ext => filename.endsWith(ext)); }