yeah that is a problem since the chrome variable will be available globally in the execution environment. I add the no-check as its an IDE issue and not actually an issue when running it.
@michmich112 thanks for the reply. The error I got was not in the IDE but when I build from the console:
"ReferenceError: chrome is not defined"
Whenever I get this build error, it seems to also break the extension because when I reload the extension it throws this error as soon as I load the Options page:
When I remove the code containing chrome from options.svelte and rebuild, the extension error on the Options page goes away. I ended up not using SvelteKit to build my extension. My original reason for trying out SvelteKit was the increase in performance and size when serving single-page apps, but I realized since extensions are loaded from your hard drive it's really not a big deal. I will still keep an eye on SvelteKit for other applications though :-).
yeah that is a problem since the
chrome
variable will be available globally in the execution environment. I add the no-check as its an IDE issue and not actually an issue when running it.@michmich112 thanks for the reply. The error I got was not in the IDE but when I build from the console:
"ReferenceError: chrome is not defined"
Whenever I get this build error, it seems to also break the extension because when I reload the extension it throws this error as soon as I load the Options page:
When I remove the code containing
chrome
from options.svelte and rebuild, the extension error on the Options page goes away. I ended up not using SvelteKit to build my extension. My original reason for trying out SvelteKit was the increase in performance and size when serving single-page apps, but I realized since extensions are loaded from your hard drive it's really not a big deal. I will still keep an eye on SvelteKit for other applications though :-).Thanks for the update, i haven't run into that problem yet but definitely something to keep an eye on! Thank you!
how to add "no-check" when running npm run build? I tried to find a solution online but couldn't