cypress-svelte-unit-test
cypress-svelte-unit-test copied to clipboard
Support external sourcemaps
Debugging the Svelte unit test is difficult because external sourcemaps seem not to be recognized or Cypress does not serve them to the browser.
Workaround: use internal sourcemap using webpack devtool option cheap-module-eval-source-map
Conceptually it seems external map files cannot be served easily, the app sources are requested with a single request like http://localhost:57301/__cypress/tests?p=cypress\integration\spec.js-619 and if that javascript points to a relative sourcemap URL at spec.map.js, the sourcemap apparently cannot be found.
This might be a cypress issue, but only for unit-test helpers like this one. Hence I add this issue here.