[lit] reexport of html from lit fails because of side effects?
See original GitHub issueDescription
I would expect to have a file with
export { html } from 'lit';
to also work if I execute it in node…
Steps to Reproduce
- Open Stackblitz demo https://stackblitz.com/edit/node-uqy5mf?file=index.js
- execute
node index.js
in the stackblitz terminal
Expected Results
A console log
Actual Results
❯ node index.js
Error: document is not defined
...
seems a side effect is doing something and fails
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (13 by maintainers)
Top Results From Across the Web
Re-export lit-html directives from LitElement #1069 - GitHub
Importing all the modules in one expression would eliminate the source of errors I encountered inadvertently loading multiple versions of lit-html.
Read more >Tree Shaking - webpack
A "side effect" is defined as code that performs a special behavior when imported, other than exposing one or more exports. An example...
Read more >Rendering - Lit.dev
Typically, the component's render() method returns a single TemplateResult object (the same type returned by the html tag function). However, it can return ......
Read more >HMR API - Vite
This is the client HMR API. For handling HMR update in plugins, see handleHotUpdate. The manual HMR API is primarily intended for framework...
Read more >Troubleshooting Omnibus GitLab installation issues
Ignoring errors can have unexpected side effects on the performance of your GitLab server, so it isn't recommended to do so. Another variation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sweet - for the simple test case
👉
index.js
it works fine 💪
will check for Rocket tomorrow but I assume it will work fine 🤗
Updated and used in rocket now 🎉
Sooo nice to get rid of this “workaround” 💪 thxxx 🙇♂️
In case anyone is curious what it helped to clean up https://github.com/modernweb-dev/rocket/pull/398