However when I download it I only get the javascript code minified.
My problem is, that i want to convert it into a vue.js environment but it seems this line
const { nodes, links } = sankey(this.data());
returns no data ( return arguments.length ? (nodes = typeof _ === “function” ? _ : constant(_), sankey) : nodes;) is provided in the console for nodes and the svg remains empty.
Are you using the runtime.js inside your vue.js application? have you see these guidelines?
Or are you trying. to convert the code from the notebook to javascript inside your vue application?
Here is a quick example, mounting the mentioned notebook inside vuejs.
The code coming from the notebook needs the runtime to run all the fancy reactivity and data flow. You can use the runtime inside your vue application and take control of your observable code. This is the best example for that case https://observablehq.com/@observablehq/how-to-embed-a-notebook-in-a-react-app, it’s using react as an example but hopefully it can give you an idea.
The added ?module parameter tells unpkg.com to rewrite all references to absolute paths, so that nested imports continue to work.
Note that you should only use this method for debugging purposes, as the number of requests will increase significantly, and browser support isn’t guaranteed.
By the way: If you call import() within an Observable notebook you can skip the "https://unpkg.com/" prefix, as Observable will prepend it automatically.