index.ts 670 B

1234567891011121314151617181920212223242526
  1. const wp = require('@cypress/webpack-preprocessor');
  2. const config: Cypress.PluginConfig = (on, config) => {
  3. const options = {
  4. webpackOptions: {
  5. resolve: {
  6. extensions: ['.ts', '.tsx', '.js'],
  7. },
  8. module: {
  9. rules: [
  10. {
  11. test: /\.tsx?$/,
  12. loader: 'swc-loader',
  13. },
  14. ],
  15. },
  16. },
  17. };
  18. on('file:preprocessor', wp(options));
  19. // `config` is the resolved Cypress config
  20. config.baseUrl = `${process.env.BRIDGE_BASE_ADDRESS || 'http://localhost:9000/'}`;
  21. config.env.BRIDGE_KUBEADMIN_PASSWORD = process.env.BRIDGE_KUBEADMIN_PASSWORD;
  22. return config;
  23. };
  24. module.exports = config;