From 4be62fbc2c8be3f4ac75b38c6503350f882c11c0 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 21 Dec 2025 22:17:49 +0100 Subject: [PATCH] test: use vite for cypress component tests fixing babel issue Signed-off-by: Ferdinand Thiessen --- cypress.config.ts | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/cypress.config.ts b/cypress.config.ts index 1e83c0b7f5d..caab3b52a56 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -128,33 +128,12 @@ export default defineConfig({ specPattern: ['core/**/*.cy.ts', 'apps/**/*.cy.ts'], devServer: { framework: 'vue', - bundler: 'webpack', - webpackConfig: async () => { - process.env.npm_package_name = 'NcCypress' - process.env.npm_package_version = '1.0.0' - process.env.NODE_ENV = 'development' - - /** - * Needed for cypress stubbing - * - * @see https://github.com/sinonjs/sinon/issues/1121 - * @see https://github.com/cypress-io/cypress/issues/18662 - */ - const babel = require('./babel.config.js') - babel.plugins.push([ - '@babel/plugin-transform-modules-commonjs', - { - loose: true, - }, - ]) - - const config = webpackConfig - config.module.rules.push({ - test: /\.svg$/, - type: 'asset/source', - }) - - return config + bundler: 'vite', + async viteConfig() { + const { default: vue } = await import('@vitejs/plugin-vue2') + return { + plugins: [vue()], + } }, }, },