little-nail-2574
05/09/2023, 4:13 PMdescribe('TEST.cy.tsx', () => {
it('playground', () => {
cy.mount(<BillingListPage/>)
cy.log( 'true' )
})
})
The project uses React, **Webpack **bundler, and Single-SPA.
The idea is to run it in standalone mode, but this is not happening.
Initially, the project was running on version 6.0.0, and I am migrating it to version ^12.0.0.
When executing the project, the component return this var_ = _non_webpack_require__(... :
and in the console:
My cypress.config.ts file:
import { defineConfig } from 'cypress';
import webpackConfig from './webpack.config';
export default defineConfig({
component: {
devServer: {
framework: 'react',
bundler: 'webpack',
webpackConfig,
},
viewportWidth: 1000,
viewportHeight: 660,
},
});
Is there any missing configuration to be able to execute the components in standalone mode?
https://cdn.discordapp.com/attachments/1105527942697721887/1105527943242973275/b64013aa-92a8-45c4-b41f-8ba26f62bfbc.png▾
https://cdn.discordapp.com/attachments/1105527942697721887/1105527943616274514/5698335f-412a-4811-a11d-d79d7335f16b.png▾
little-nail-2574
05/10/2023, 1:05 PMwonderful-match-15836
05/10/2023, 2:17 PMwindow.location) you might hit some issues.
A debugging step might be: what happens if you try to mount your smallest component, something like a button - do you have the exact same error? It seems like you might be able to skip all the Single-SPA stuff in a Cypress component test, and just test things as plain React components - but that's at a glance as I don't know how if that's feasible.
Sorry I don't have anything more specific!little-nail-2574
05/10/2023, 2:25 PMwonderful-match-15836
05/10/2023, 2:26 PMlittle-nail-2574
05/10/2023, 2:28 PMwonderful-match-15836
05/10/2023, 2:33 PMlittle-nail-2574
05/10/2023, 2:57 PM