Does this mean that importing code from other notebooks will now skip the cells in those notebooks that aren't referenced? So if (for example) I have a lot of examples and images in that notebook, those won't be loaded if all I import is the code in one cell?
It’s always been the case that imports are evaluated lazily. If you import a notebook and you don’t reference some cells (transitively, meaning either directly or indirectly), then those cells won’t run. So if the unreferenced cells load a file or do something else expensive, that is automatically avoided.
That said, transitive imports of notebooks are currently static, and thus will be run even if none of the imported cells are referenced. I’d like to improve this by switching to dynamic import, but I don’t know when I’ll have time to do it. There’s an issue here if you’d like to vote on it.
https://github.com/observablehq/feedback/issues/74