From 50b3f51c0001fd291d438edb551163e56607442f Mon Sep 17 00:00:00 2001 From: Timeless0911 <1604889533@qq.com> Date: Wed, 31 Jul 2024 15:14:36 +0800 Subject: [PATCH] chore: update --- e2e/cases/dts/bundle-false/rslib.config.ts | 3 +++ e2e/cases/dts/bundle/rslib.config.ts | 6 +++++- e2e/cases/dts/index.test.ts | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/e2e/cases/dts/bundle-false/rslib.config.ts b/e2e/cases/dts/bundle-false/rslib.config.ts index 6126019a2..42d99d4a0 100644 --- a/e2e/cases/dts/bundle-false/rslib.config.ts +++ b/e2e/cases/dts/bundle-false/rslib.config.ts @@ -11,6 +11,9 @@ export default defineConfig({ }), generateBundleCjsConfig(__dirname, { bundle: false, + dts: { + bundle: false, + }, }), ], source: { diff --git a/e2e/cases/dts/bundle/rslib.config.ts b/e2e/cases/dts/bundle/rslib.config.ts index 0b3148148..ae05de122 100644 --- a/e2e/cases/dts/bundle/rslib.config.ts +++ b/e2e/cases/dts/bundle/rslib.config.ts @@ -11,7 +11,11 @@ export default defineConfig({ bundle: true, }, }), - generateBundleCjsConfig(__dirname), + generateBundleCjsConfig(__dirname, { + dts: { + bundle: true, + }, + }), ], source: { entry: { diff --git a/e2e/cases/dts/index.test.ts b/e2e/cases/dts/index.test.ts index 70934e86c..63606aca1 100644 --- a/e2e/cases/dts/index.test.ts +++ b/e2e/cases/dts/index.test.ts @@ -4,6 +4,7 @@ import { expect, test } from 'vitest'; import { getResults } from '#shared'; import { loadConfig } from '../../../packages/core/src/config'; +// TODO: we use npx here to test since node api will directly exit main process test('dts when bundle: false', async () => { const fixturePath = join(__dirname, 'bundle-false'); const rslibConfig = await loadConfig(join(fixturePath, 'rslib.config.ts'));