From b749a274be69aab14c64bc926a60c84faef7d173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Mon, 16 Oct 2023 20:49:32 +0800 Subject: [PATCH] fix: add newline after cjsInterop closes #1022 --- src/plugins/cjs-interop.ts | 2 +- vitest.config.ts | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/plugins/cjs-interop.ts b/src/plugins/cjs-interop.ts index 56c8289f7..eae475ec2 100644 --- a/src/plugins/cjs-interop.ts +++ b/src/plugins/cjs-interop.ts @@ -18,7 +18,7 @@ export const cjsInterop = (): Plugin => { } return { - code: code + '\nmodule.exports = exports.default', + code: code + '\nmodule.exports = exports.default;\n', map: info.map, } }, diff --git a/vitest.config.ts b/vitest.config.ts index 4ca2f9af5..ed7271dac 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,9 +1,7 @@ -import { UserConfig } from 'vitest' +import { defineConfig } from 'vitest/config' -const config: { test: UserConfig } = { +export default defineConfig({ test: { testTimeout: 50000, }, -} - -export default config +})