import { defineConfig } from 'cypress' import * as createBundler from '@bahmutov/cypress-esbuild-preprocessor' const isCI = process?.env?.CI || false export default defineConfig({ e2e: { baseUrl: isCI ? `http://localhost:8187` : `https://local.imediafly.com:8187`, defaultCommandTimeout: 8000, reporter: 'junit', scrollBehavior: 'nearest', setupNodeEvents(on, _config) { on('file:preprocessor', createBundler(/* esbuild options... */)) }, specPattern: [ 'cypress/**/*.spec.ts', ], supportFile: false, video: false, viewportHeight: 1200, watchForFileChanges: !isCI, }, reporterOptions: { 'mochaFile': 'cypress/xmloutput/cypress-results.xml', }, })