Closed JamesIves closed 1 year ago
Ah! Figured out my issue right after posting this. The src needs to be relative;
'use client'
export default function Stories() {
return <open-stories src="./api/screenshots"></open-stories>
}
Edit: Ah turns out this is not strictly the case. Opened https://github.com/dddddddddzzzz/open-stories-element/pull/14 with a potential fix!
I'm attempting to load the
<open-stories>
custom element with Next.js and I seem to be running into a few issues, primarily this is the error I'm getting that is preventing the element from displaying:I'm loading the component client-side like so within a wrapper React component;
The endpoint resolves to a valid schema, when requested in the browser you get the following:
I'm unsure if this error is directly related to Next.js or not. When I exclude the src property from the web component it loads correctly, and you can see the Shadow DOM mount. 🤔
Any help would be super appreciated!