Update requirejs config

Is there a way to set the requirejs shim config in observable modules?

I’d like to set the shim config for Vega-Embed with something like

requirejs.config({
  shim: {
    "vega-embed@3": ["vega@3", "vega-lite@2"]
  }
});

Thanks!

Currently there isn’t: the require() method is based on d3-require, rather than requirejs, and we’re still sorting through a future-proof, or at least future-resistant way to configure transitive dependencies.

Ahh, now it all makes sense. Is there a recommended way to support shimmed modules?

In particular, I want to support Vega-Embed, which is a shimmed library that depends on Vega and Vega-Lite to be loaded already. I don’t see any way in d3-require to define the dependency chain.

Hello forum! Require is related but didn’ help me with this particular issue. I don’t want to pre-build the package because always want to use the latest Vega and Vega-Lite versions.

Thank you for your help Tom!