🏠 back to Observable

Set version of peer dependencies

I am trying to figure out how to tell vega-embed what versions it should load. You can see that in https://observablehq.com/d/e55b7a44be1e6e5c, I am loading Vega 5.3.1 through Vega-Embed even though I would like Vega 5. What is the easiest way to do this? I am asking since I wonder whether it’s a good idea to use peer dependencies without a particular version in Vega-Embed.

You can use require.alias for that:

Ahh, I missed that. I added some notes on this in https://observablehq.com/@vega/hello-vega-embed.