diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-07-23 22:12:41 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-08-02 15:19:32 +0200 |
commit | ee18e43d9731bf701744147992872aa98176621c (patch) | |
tree | 20ab3467834f51ed3faf5bfd0d30a5c001ef53a7 /cypress.config.ts | |
parent | 4c306a3a5557f570e39b65426d5bb7cd6acd69cc (diff) | |
download | nextcloud-server-ee18e43d9731bf701744147992872aa98176621c.tar.gz nextcloud-server-ee18e43d9731bf701744147992872aa98176621c.zip |
fix(cypress): Make sure cypress can preprocess files corrently (this drops 78 dependencies)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress.config.ts')
-rw-r--r-- | cypress.config.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cypress.config.ts b/cypress.config.ts index 8906257cda1..4f15c9a2a23 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -6,8 +6,10 @@ import { waitOnNextcloud, } from './cypress/dockerNode' import { defineConfig } from 'cypress' +import webpackPreprocessor from '@cypress/webpack-preprocessor' +import type { Configuration } from 'webpack' -import browserify from '@cypress/browserify-preprocessor' +import webpackConfig from './webpack.config.js' export default defineConfig({ projectId: '37xpdh', @@ -45,8 +47,7 @@ export default defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. async setupNodeEvents(on, config) { - // Fix browserslist extend https://github.com/cypress-io/cypress/issues/2983#issuecomment-570616682 - on('file:preprocessor', browserify({ typescript: require.resolve('typescript') })) + on('file:preprocessor', webpackPreprocessor({ webpackOptions: webpackConfig as Configuration })) // Disable spell checking to prevent rendering differences on('before:browser:launch', (browser, launchOptions) => { @@ -113,7 +114,7 @@ export default defineConfig({ }, ]) - const config = require('@nextcloud/webpack-vue-config') + const config = webpackConfig config.module.rules.push({ test: /\.svg$/, type: 'asset/source', |