Open joleeee opened 1 month ago
Start a new pull request in StackBlitz Codeflow.
I changed my histoire.setup.ts (setupFile: '/src/histoire.setup.ts',
) to
import './routes/styles.css';
window.doesNotExist = "asdf";
window.URL.createObjectURL = () => { };
And edited the crashing maplibre code:
if (typeof window !== 'undefined') {
console.log(window.doesNotExist) // mine
maplibregl.workerUrl = window.URL.createObjectURL(new Blob([workerBundleString], { type: 'text/javascript' }));
}
And i actually get this output:
asdf
Error while collecting story <redacted>.svelte:
TypeError: window.URL.createObjectURL is not a function
So this just makes it even weirder for me
Describe the bug
Using LibreMap in a story makes the collection fail. Note that adding the libremap component while the story is running, DOES work.
Reproduction
https://stackblitz.com/edit/histoire-svelte3-starter-91tfys?file=src%2FMapLibre.story.svelte
This is the most relevant info i found, but I could not get it to work: https://devpress.csdn.net/react/6304db157e6682346619cf34.html
System Info
Used Package Manager
npm
Validations