-
Notifications
You must be signed in to change notification settings - Fork 10
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build errors not shown in dev mode when using Lit SSR #1336
Comments
So there are a couple of issues here but to try and break them down
So the issue here is that Lit's SSR capability does not support native I could have sworn I had this called out in the caveat's section but it is not there, so I have opened a PR to document this, so thanks for catching this! 👀 edit: I agree not seeing the error during development is annoying, and so we plan to bring the
Based on the demo repo I have been validating these changes in, I was able to confirm all the Spectrum JS and CSS imports work in both dev and prod builds and you can see a production build here hosted on Vercel. Do note I use the bare specifier when calling it from JavaScript import SpectrumCard from '@spectrum-css/card' with { type: 'css' };
console.log({ SpectrumCard }); The path you're using looks to be more of their recommendation when using Let me add an example of the CSS flavor that to that demo though just to make sure I don't forget any use cases. (Also keeping in mind this is all in alpha stage, I would ask that we use Discord for this kind of pre-release feedback, or the existing issue if one exists to help keep the conversations in one place) |
So added a demonstration of using |
Oh. I forgot to put I had also tested in 0.30.2, what I was actually trying to type was that it was still there. |
Sorry, could you clarify to which of the above points you are referring to here? |
when I filed the bug, I first observed the behaviors listed with
and then upgraded to the alpha to see if the changes fixed them. I reported only after seeing that they persisted. From our further discussions, I realize that the first bullet point about the html element is almost certainly me misunderstanding the prerendering and the lit renderer plugin, so I'm exploring that more. |
Updated the description to reflect the part that remains an outstanding bug now that you've explained things to me. The tip of the branch now has a better minimal reproduction. |
Hmm, I'm not seeing the commented out lines that you reference in your description? That said, this error
Is expected when using Lit+SSR for prerendering or SSR routes. The is item #3 in the caveats section
Because of the above issue, I don't see any other error. I think I might move this one to a discussion for now as we work through the multiple items being covered here Q & A style (we can have one comment thread per item that way), and then happy to extract any reproductions we find into their own. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Type of Change
Bug
Summary
build and dev mode show different behaviors with typescript. Something that works in dev should at least build.
Details
pnpm run dev
but will show a runtime error saying it cannot find the module. The component will not render. If you run
pnpm run build
you will be told
pnpm run dev
and the component will render. However, if you runpnpm run build
you getThis has been reproduced with 0.30.2 and with 0.31.0-alpha.0
This description has been updated to remove portions that were not in fact bugs but reflected failures of my understanding.
The text was updated successfully, but these errors were encountered: