Can't get Lit or components to work - help! #4176
-
Beta Was this translation helpful? Give feedback.
Answered by
bennypowers
Sep 3, 2023
Replies: 1 comment 8 replies
-
Your result is correct. You should see the paragraph rendered in shadow DOM. More about shadow DOM: https://lit.dev/docs/components/shadow-dom/ |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No problem
There are two main options to solve this error
The first is called import maps. You can generate an import map for your page at http://generator.jspm.dev and it will work in production.
Another option is called node resolution. You can turn it on by adding
--node-resolution
to the wds command. This will only work for the dev server: for production, you'll need to use a bundler like esbuild, rollup, or webpack. Configuration of those bundlers is complex, you should seek support for them in their dedicated channels.