chrome-extension - for recording testing scenarios
src
: TypeScript source filespublic
: Chrome Extension manifest, icon, HTMLsdist
: This is where the Chrome Extension will be builtdist/build
: Generated JavaScript bundles with source mapping, and assets
Create a .env
file in te root of the project.
Add the following lines to the .env
file:
API_BASE_URL=http://788c9076.ngrok.io/extension/api/v1
API_AUTH=<base64 ecoded basic credentials>
Runs webpack in watch mode, generates bundles with source mapping
npm start
Runs webpack and generates the minified bundles
npm run build
- Build the extension
- Open Chrome and go to
chrome://extensions
- Click
Load unpacked extension...
- Load the
dist
directory
- Click on the icon of your extension opens the popup window
- Right click and open DevTools
- In DevTools you can press Ctrl+R to reload
- Because source maps are generated, you can easily debug your ts code in DevTools