index.ts 698 B

123456789101112131415161718192021222324252627
  1. import * as wp from '@cypress/webpack-preprocessor';
  2. module.exports = (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: 'ts-loader',
  13. options: { happyPackMode: true, transpileOnly: true },
  14. },
  15. ],
  16. },
  17. },
  18. };
  19. on('file:preprocessor', wp(options));
  20. // `config` is the resolved Cypress config
  21. config.baseUrl = `${
  22. process.env.BRIDGE_BASE_ADDRESS || 'http://localhost:9000/'
  23. }`;
  24. config.env.BRIDGE_KUBEADMIN_PASSWORD = process.env.BRIDGE_KUBEADMIN_PASSWORD;
  25. return config;
  26. };