Skip to content

Localhost Development

Once you’re past the “hello world” stage, re-zipping and re-uploading every time you change a line gets old fast. The localhost pattern gives you a much tighter feedback loop: your extension loads from a local server, so you just save and refresh.

Instead of bundling your files in a zip, you:

  1. Run a local web server that serves your extension files
  2. Create a manifest that points baseUrl at your local server
  3. Upload just that manifest file to Extension Manager
  4. Edit your code, refresh the panel, see changes immediately

You’ll need at minimum:

  • index.html (your extension UI and code)
  • manifest.json (pointing at localhost)

For example, reuse the index.html from the hand-coded tutorial.

Your manifest’s baseUrl points to your local server instead of a relative path:

{
"manifestFormatVersion": "1.0.0",
"id": "my-extension-dev",
"name": "My Extension (Dev)",
"baseUrl": "https://localhost:9000/",
"mainFile": "index.html",
"window": {
"type": "floating",
"width": 400,
"height": 500
},
"commands": {
"open": {
"title": "My Extension (Dev)"
}
},
"menuItems": [
{ "type": "item", "commandId": "open" }
]
}

Any server that can serve static files over HTTPS will work. Here are a few options:

Python (with the CORS/SSL script from Local Development):

Terminal window
python3 server.py 9000 su-extension.pem su-extension-key.pem

npx serve (if you have Node.js):

Terminal window
npx serve -l 9000 --ssl-cert su-extension.pem --ssl-key su-extension-key.pem --cors

Vite (for framework-based projects):

Terminal window
npx vite --port 9000 --https

Drag your manifest.json into the Extension Manager the same way you would a full extension. SketchUp will load your extension from localhost instead of from the zip contents. (You can find a complete example localhost manifest from the getting-started repo.)

Now the workflow is:

  1. Edit your index.html (or whatever files your server is serving)
  2. Right-click in your extension iframe → Reload Frame
  3. See your changes immediately

No re-zipping, no re-uploading.