| 1234567891011121314151617181920212223242526 |
- const wp = require('@cypress/webpack-preprocessor');
- const config: Cypress.PluginConfig = (on, config) => {
- const options = {
- webpackOptions: {
- resolve: {
- extensions: ['.ts', '.tsx', '.js'],
- },
- module: {
- rules: [
- {
- test: /\.tsx?$/,
- loader: 'swc-loader',
- },
- ],
- },
- },
- };
- on('file:preprocessor', wp(options));
- // `config` is the resolved Cypress config
- config.baseUrl = `${process.env.BRIDGE_BASE_ADDRESS || 'http://localhost:9000/'}`;
- config.env.BRIDGE_KUBEADMIN_PASSWORD = process.env.BRIDGE_KUBEADMIN_PASSWORD;
- return config;
- };
- module.exports = config;
|