From b4164c562e6ef47eab58272073bedece22021b31 Mon Sep 17 00:00:00 2001 From: XiaoPi <530257315@qq.com> Date: Sat, 10 Feb 2024 13:31:22 +0800 Subject: [PATCH] Resolve all rollup imports to node_modules to avoid type conflict (#5386) Resolve all rollup imports to node_modules --- test/types.d.ts | 3 +-- tsconfig.json | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/types.d.ts b/test/types.d.ts index 687c0096bbd..2c596de3b48 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -1,6 +1,5 @@ import type { SourceMap } from 'magic-string'; -import type { RollupLog } from 'rollup'; -import type { RollupBuild, RollupError, RollupOptions } from '../src/rollup/types'; +import type { RollupBuild, RollupError, RollupLog, RollupOptions } from '../src/rollup/types'; export interface TestConfigBase { /** diff --git a/tsconfig.json b/tsconfig.json index 2f6e0568a62..2d45d701830 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,10 @@ "skipLibCheck": true, "strict": true, "target": "ES2022", - "useDefineForClassFields": false + "useDefineForClassFields": false, + "paths": { + "rollup": ["./node_modules/rollup"] + } }, "include": ["typings/**/*.d.ts", "src", "cli", "browser", "rollup.config.ts", "native"], "exclude": ["dist", "node_modules", "test/typescript", "browser/dist"]