google/model-viewer

Update lit dependency to 3.1

jcoyne opened this issue · 6 comments

Update lit dependency to 3.1

Planning to send a PR? Would also be nice to know what this unblocks, though I agree that staying up-to-date with dependencies is a good idea.

I'm not planning on sending a PR. I just wanted to track this issue. I'm most concerned with https://github.com/lit/lit/pull/2103/files#diff-9204efca403aca3ce114a362b26ecd70d56cc7f3e093f895c9cfc2bd2b4f4800 which allows lit to be used via importmap on a CDN.

Does that issue flow down to MV? I believe MV works via importmap on a CDN currently.

I might be a bit confused about this matter. On this page https://modelviewer.dev/examples/postprocessing/ I see an importmap is used for three, but not for lit. My assumption was that lit needs to be in the importmap as well since it is a dependency in https://github.com/google/model-viewer/blob/master/packages/model-viewer/package.json#L86C6-L86C9

No, we generally bundle all of our dependencies so that no import maps are needed. For the special case of the optional postprocessing feature, we split it into three: model-viewer-module, model-viewer-effects, and the standard three.js library which they both depend on. Lit is still bundled (it's tiny).

Oh, cool! Thanks for explaining it to me.