You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using svelte to build web components that I can use in server rendered frameworks, Django in this case.
When I import the web component, I get the error:
Component.js:130 Uncaught TypeError: Cannot read properties of undefined (reading '$$')
at q (Component.js:130:44)
at new ht (App.svelte:10:50)
at main.js:4:13
By exploring the included javascript which thankfully has the source map, I discover it fails at the entry point:
target: document.getElementById('app')
Workaround:
In my 'vanilla html' I added the id="app to the body tag, which solves the issue:
<bodyclass="h-full bg-gray-50" id="app">
Not sure if this is intended or an issue? in any case I wasn't able to find any instructions, so I thought I would post in case others have the same problem.
Fortunately in my case having that id in the body tag is no bother, just took a little while to trouble shoot.
Describe the bug
Maybe related: #7968
I am using svelte to build web components that I can use in server rendered frameworks, Django in this case.
When I import the web component, I get the error:
By exploring the included javascript which thankfully has the source map, I discover it fails at the entry point:
Workaround:
In my 'vanilla html' I added the
id="app
to the body tag, which solves the issue:Not sure if this is intended or an issue? in any case I wasn't able to find any instructions, so I thought I would post in case others have the same problem.
Fortunately in my case having that
id
in the body tag is no bother, just took a little while to trouble shoot.Reproduction
package.json
vite.config.js
./lib/StreamSelectPlay.component.svelte
Generating a web component (
Makefile
):Which invokes:
vite build
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: