Closed zakaria-chahboun closed 1 year ago
@zakaria-chahboun i can understand why this issue ? but this should not occur in browser environment. Can you tell me where you are using this and more info about your app.
@ujjwalguptaofficial in SvelteKit
framework, the code is running in both server-side and client-side! can you do something for that? Thanks! :tulip:
@zakaria-chahboun indexedd is client side tech, so in server it won't execute. Do something to make sure it runs inside only client only.
somthing like
if(isClient){
executeJsStore();
}
Hope this make sense.
i already did that by
import { browser } from '$app/environment';
if(brower){
// .....
}
and it's work fine, But if you can just eliminate the worker
.
some libraries support SSR
even if it works only in the browser. if you can do that it will be good for SSR frameworks!
I have this errors:
I believe webpack has set it as self for a certain reason. But in order to work on browser and node you can simply switch to this: