-
Notifications
You must be signed in to change notification settings - Fork 319
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
Imported superclass not rendering #836
Comments
Hi, I did your idea recently. |
I'm experiencing the same problem with a superclass of my own creation, when attempting to import into another module only. I've done some digging and have identified the cause. I should also mention that I'm using Webpack, which contributes to problem. Assume for a moment that you have module A and module B. When you're extending a LitElement component from module A in module B, presumably providing some content to render via LitElement's Now consider this line of code from LitElement: This checks if the result from render() on your component in module B is a class of LitElement's In such cases where you want to import and modify LitElement components from other modules, you essentially have a couple of options:
I went with option 3, which is working well. |
It's not clear from the initial, but perhaps this is just a WebPack issue and is addressed by the previous comment. If that's not the case, please feel free to re-open this issue, providing a reproduction and/or a detailed description of your build setup. Thanks. |
Im working on a monorepo and I have a really simple base class to be extended by my custom elements. But when import it from the modules it just doesn't render. The file is being imported fine since everything else still runs and the render function is executed, except nothing gets rendered. The element gets a shadow DOM but its empty.
I tried the following too
If i move the base.js file to the same directory and import it then it works for some reason.
The text was updated successfully, but these errors were encountered: