Skip to article frontmatterSkip to article content
tools = require('../js/tools'); tools.init()
Loading...

vscode’s livepreview

instead of switching constantly between vscode and your browser, you can use vs-code’s livepreview extension

to install it, search for live preview in vscode’s extension pane; it’s by MicroSoft and has about 8M downloads

with that extension enabled, the workflow is much faster, as you can see here:

caveats

when ran this way, the devel tools will show your document but within the vscode context
this is described in greater length in this SO answer, but in a nutshell this is because vscode is a web app in itself, and so you’re going to inspect the full vscode elements, of which your document is just a fragment

and it can make navigating through the DOM a little confusing
if that’s an issue you can also use vite=

conclusion

you can very easily speed up your development workflow with livepreview !