Package Exports
- create-react-ext
- create-react-ext/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-react-ext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
A tool to generate Chrome extension (manifest v3) using React & Webpack with manual and auto-update support
How it works
Tool will watch for changes in background.js / manifest.js or in React project and auto-update extension with changed files
https://user-images.githubusercontent.com/7237762/223497590-0d7b3fac-c6c9-488f-bbc5-eb3aa5a0f059.mp4
Manual reload:
How to use
- Create React project (using create-react-app for instance)
- Install
create-react-ext
: npm i create-react-ext - Install
@types/chrome
: npm i @types/chrome (it'll add type definitions for Chrome extension development) - Start project (npm start for instance). After that webpack-dev-server must be launched at localhost:3000
- Generate extension: cd node_modules/create-react-ext && npm start (it'll add
ext
folder in your project) - Load this extension in Chrome from ext folder
- Work with React project. Work with background.js / manifest.js. Changes will automatically update the extension
TODO:
- Terminate broken ws-connections?
- Use webpack build assets? currently used generated from webpack-dev-server
License
MIT License