| 12345678910111213141516171819202122232425262728 |
- import * as wp from '@cypress/webpack-preprocessor';
- module.exports = (
- on: Cypress.PluginEvents,
- config: Cypress.PluginConfigOptions,
- ): Cypress.PluginConfigOptions => {
- const options = {
- webpackOptions: {
- resolve: {
- extensions: ['.ts', '.tsx', '.js'],
- },
- module: {
- rules: [
- {
- test: /\.tsx?$/,
- loader: 'ts-loader',
- options: { happyPackMode: true, transpileOnly: true },
- },
- ],
- },
- },
- };
- 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;
- };
|