-
Notifications
You must be signed in to change notification settings - Fork 198
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
[bundler] Bundled shell does not re-export ids used by multiple fragments; './x-app.js' does not provide an export named 'directive' #721
Comments
See lit/lit#515 for a minimal reproduction. I dont see this happen for all shared imports. Possibly it has something to do with the export * |
Also seeing this, any thoughts towards a fix or areas I might support investigating towards one? |
Indeed @LarsDenBakker it does seem to be somehow related to the
The error is avoided. |
I debugged around on this a bunch over the weekend, and while I'm not really closer to understanding how to fix this issue, I hope maybe someone with more experience in this area could maybe build off of my findings. After doing some ridiculously naive debugging (if anyone has a good article or video on debugging this sort of code, I'd be ravenous to learn how to make this easier for myself, really I'm just dropping moduleUrl /node_modules/lit-html/lit-html.js moduleUrl /node_modules/lit-html/lib/directive.js This would be all well and good, except with the storage of It's not 100% clear if this is supposed to be avoided by the fact that the build is also emitting the In that it looks like I can work around this in my project by avoiding the use of directives for right now, I'm not sure how much more time I can put into correcting this issue in the near term. In our world of conference driven development, I hope the possibility of a 1.0 release of lit-html/lit-element (@justinfagnani) at CDS (in just 4 week, 😱😀🎉) might bump this up in priority. In support of that, I'd be happy to revisit my findings above with anyone who happened to be looking into this, as I'm sure the ramblings above make less sense than they could. |
There is a bug in rollup specifically related to the use of I'm looking at possible workarounds for this within bundler. One of them is essentially what you demonstrated, which is performing a translation of the |
@usergenic were you able to get the workaround you envisioned into #722? And, do you have an idea when it might be part of a release? Unless I'm doing something wrong, which is always possible, neither versions 1.8.1 nor 1.9.0-pre.2 of |
Can we get a release? This is a really nasty bug that we'd really like to have a fix for... |
Fixed in polymer-cli 1.9.0 |
Setup:
If my-view1 uses a directive (e.g.
repeat
):And my-view2 uses another directive (e.g.
unsafeHTML
):Then both fragments will try to import
directive
from my-app, but my-app doesn't export it.Repro:
$ git clone -b lit-element https://github.com/Polymer/shop.git $ cd shop $ npm i $ polymer build $ polymer serve build/esm-bundled
Navigate to the detail view (e.g. http://localhost:8081/detail/ladies_outerwear/Ladies+Pullover+L+S+Hood). Note the console error
The text was updated successfully, but these errors were encountered: