From 63469ed875ea81b6d05b3efbdf7f206a94a709cf Mon Sep 17 00:00:00 2001 From: anyesu Date: Mon, 8 Jul 2024 12:25:39 +0800 Subject: [PATCH] feat: support `globalTypeFiles` option ref: - https://github.com/vuejs/core/commit/4e028b966991937c83fb2529973fd3d41080bb61 - https://github.com/vuejs/core/issues/8612#issuecomment-1600030885 --- src/index.ts | 1 + src/resolveScript.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 890dc1cb..c52aaccb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -31,6 +31,7 @@ export { VueLoaderPlugin } export interface VueLoaderOptions { // https://babeljs.io/docs/en/next/babel-parser#plugins babelParserPlugins?: SFCScriptCompileOptions['babelParserPlugins'] + globalTypeFiles?: SFCScriptCompileOptions['globalTypeFiles'] transformAssetUrls?: SFCTemplateCompileOptions['transformAssetUrls'] compiler?: TemplateCompiler | string compilerOptions?: CompilerOptions diff --git a/src/resolveScript.ts b/src/resolveScript.ts index 5215a246..f37bc504 100644 --- a/src/resolveScript.ts +++ b/src/resolveScript.ts @@ -75,6 +75,7 @@ export function resolveScript( }, transformAssetUrls: options.transformAssetUrls || true, }, + globalTypeFiles: options.globalTypeFiles, }) } catch (e) { loaderContext.emitError(e)