Warning: This feature is a work in progress and may be incomplete or subject to change. If you see an error or something that could be improved, please make a pull-request. The link that documents this feature can be found at the bottom of the page.
The dev
command in Extension.js is responsible for running your extension in development mode.
This command will start a new browser instance with your extension bundled and ready to run,
while also enabling live-reload as you modify the extension files during development.
You can run the dev
command with the following syntax:
The dev
command is essential for a fast development workflow. It watches for changes in your extension's files,
recompiles them, and reloads the extension in real time. If you provide a URL, Extension.js will download and run the extension as if it were local.
It supports multiple browsers, and you can specify which one to use by passing the --browser
flag.
Setting the browser
to "all"
will open the extension in all available browsers.
If a browser is not installed, the command will throw a compiler error.
Below is a breakdown of the available flags for the dev
command:
Flag | Argument | What it does | Defaults to |
---|---|---|---|
[path or url] | The extension path or the remote extension URL | If a path is defined, it loads the local extension. If a URL is provided, it pulls the extension from a remote source and loads it as a local extension | process.cwd() |
-b, --browser | The browser that will run the extension | Changes the browser (chrome , edge , all ) |
"chrome" |
--browser
flag to run your extension in different browsers during the development process.