Learn how to execute JavaScript functions at the edge to optimize site performance and customize web experiences.

Get Started    

Code bundle editor

The code bundle editor is built-in to the EdgeWorkers Management application. You can use this custom tool to edit your EdgeWorkers without having to set up an integrated development environment or use a command line interface.

This tool is useful as a quick editor so you can view, validate, and edit the bundle.json and main.js files in your code bundles.

  1. Log in to Control Center.

  2. Go to > CDN > EdgeWorkers.

  3. Select the EdgeWorker ID you want to edit.

  4. Select an EdgeWorker version from the EdgeWorker details page.

  5. Select Code Bundle.

    The files included in the EdgeWorker version appear in the Code bundle editor.

Code bundle editorCode bundle editor

  1. Review these features to learn how the code bundle editor can help you validate and edit your EdgeWorkers.
1. File treeNavigate between your EdgeWorkers by selecting a folder in the file tree. Open the bundle.json and main.js files to view them in the Code editor. Use the right click menu options to create a new directory or a new file in any existing directory or the root of the EdgeWorkers code bundle. You can also use the right click menu options to rename, remove, or copy/paste the files in the file tree.
2. Code editorView the contents of the file you selected in the file tree. Here you can also view semantic and syntax validation. To save any changes you've made you need to create a new EdgeWorker version. Do this by manually typing in a new EdgeWorker version number.
3. Validation sectionView any validation errors. You cannot save an EdgeWorkers code bundle that contains validation errors.
4. Save as new versionThe Save as new version button remains inactive until you update the EdgeWorker version number and resolve any validation errors. The Activate version button is only enabled when a valid version is available.

Updated 6 months ago

Code bundle editor

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.