From c5f1e9e589d83ad777a211487458418dd43a57ab Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 14 Jul 2022 13:10:24 +0800 Subject: [PATCH] feat: support vite.config.mts and vite.config.cts It's added in Vite 3.0: https://github.com/vitejs/vite/pull/8729 --- npm/vite-dev-server/src/constants.ts | 2 ++ packages/launchpad/cypress/e2e/error-handling.cy.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/npm/vite-dev-server/src/constants.ts b/npm/vite-dev-server/src/constants.ts index 48b5e73a764c..bed23030e9ce 100644 --- a/npm/vite-dev-server/src/constants.ts +++ b/npm/vite-dev-server/src/constants.ts @@ -3,4 +3,6 @@ export const configFiles = [ 'vite.config.js', 'vite.config.mjs', 'vite.config.cjs', + 'vite.config.mts', + 'vite.config.cts', ] diff --git a/packages/launchpad/cypress/e2e/error-handling.cy.ts b/packages/launchpad/cypress/e2e/error-handling.cy.ts index c9ff3c2b9525..cef2949088a1 100644 --- a/packages/launchpad/cypress/e2e/error-handling.cy.ts +++ b/packages/launchpad/cypress/e2e/error-handling.cy.ts @@ -68,7 +68,7 @@ describe('Error handling', () => { cy.openProject('missing-vite-config', ['--component']) cy.visitLaunchpad() - ;['vite.config.js', 'vite.config.ts', 'vite.config.mjs', 'vite.config.cjs'].forEach((idiomaticConfigFile) => { + ;['vite.config.js', 'vite.config.ts', 'vite.config.mjs', 'vite.config.cjs', 'vite.config.mts', 'vite.config.cts'].forEach((idiomaticConfigFile) => { cy.contains(idiomaticConfigFile) })