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 (as a zip) 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 or grab one from the getting-started repo.

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

Zip up just your manifest.json and upload it to Extension Manager the same way you would a full extension. SketchUp will load your extension from localhost instead of from the zip contents.

Now the workflow is:

  1. Edit your index.html (or whatever files your server is serving)
  2. Right-click the extension panel → Reload (or close and reopen it)
  3. See your changes immediately

No re-zipping, no re-uploading.