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 preview
command allows you to run your extension in a production-like environment without making a final build. It simulates how the extension will behave in a production browser environment. This is helpful for testing before officially deploying or building the extension.
preview
command runs the extension in a browser with production-like settings, providing a realistic preview of the extension's final behavior.Extension.js
will download and preview the extension from that remote source, just like local extensions.chrome
, edge
, etc.) should preview the extension.Flag | Argument | What it does | Defaults to |
---|---|---|---|
[path or url] | The extension path or the remote extension URL | If a path is defined, previews the local extension. If a URL is provided, pulls the extension from remote source and previews it as a local extension | process.cwd() |
-b, --browser | The browser that will run the extension | Specifies the browser (chrome , edge , all ) |
"chrome" |
To preview your extension for Edge, run the following command:
When running the preview
command, Extension.js follows these steps:
manifest.json
file exists in the project directory.preview
to test how your extension will behave in production before using the build
command for the final package.--port
flag to avoid conflicts.