I'm using imports with absolute paths in my Parcel project but these absolute paths aren't equally resolved by Cypress tests.
Difference in module resolution
Parcel: import {foo} from '/foo.js': relatively to project root
Cypress: import {foo} from '/foo.js': absolute on disk root
When Parcel's entry point is in src folder importing /foo.js anywhere in the project looks for file in path <project>/src/foo.js. (Docs: https://parceljs.org/module_resolution.html#absolute-paths)
But Cypress doesn't have any entry point and if it tries to import a file using absolute path it considers / as a filesystem root. This can happen when imported file (foo.js) internally imports another file (bar.js).
Example
cypress-test.js
import {foo} from '../../src/foo.js' // I don't care using relative paths in tests.
// tests here...
foo.js
import {bar} from '/bar.js' // Absolute path not found by Cypress
//...
How can I make Cypress to resolve absolute paths relative to some entry point as Parcel does?