-
Notifications
You must be signed in to change notification settings - Fork 920
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
[BUG] @stencil/core not building #3281
Comments
Looks like it's being caused by this dynamic import in the Stencil code. In the !BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && 8 & o.$flags$ && (n = await import("./shadow-css.js").then((e => e.scopeCss(n, l, !1)))), I think this is the same root cause as #3094. Looks like esbuild doesn't natively support dynamic imports yet, so Snowpack would have to work around this but doesn't quite do it right atm. Though it's possible I've missed something and this is actually coming from Rollup - not 100% sure. It appears that the Stencil team is also aware of this issue. |
Snowpack is broken by FredKSchott/snowpack#3281
Bug Report Quick Checklist
Describe the bug
Snowpack does not seem to play nice with
@stencil/core
Seeing the error below when
import stencil from '@stencil/core/internal/client'
exists within code. This is a necessary import for Stencil custom elements.Error:
[16:19:08] [snowpack] Cannot find module ''../../../common/shadow-css-bb8fe40a.js'' from '/Users/cmditch/sandbox/snowpack-stencil/node_modules/@stencil/core/internal/client/index.js'
To Reproduce
Expected behavior
A build w/o errors.
Anything else?
When I load a stencil component via a
<script>
tag over the wire it works, but if I try to build it using snowpack it does not work. Stencil docs have an example of how to bundle a component w/ rollup here, so it seems like Stencil and rollup can play nice. Perhaps it's the way snowpack is configuring rollup.Lastly, oddly enough the file/path
../../../common/shadow-css-bb8fe40a.js
does not even exist withinnode_modules/@stencil/core
. It's also not clear where this filename is being generated within their source.The text was updated successfully, but these errors were encountered: