Giter Site home page Giter Site logo

chrome-extension-boilerplate's Introduction

chrome-extension-boilerplate

A chrome extension boilerplate by Webpack5 + TS + React

Features

  • Support manifest v2 and v3
  • Support HMR
  • Support react fast refresh
  • Support auto reload when content scripts change
  • Support dynamic generate content scripts
  • Support use vscode to debug content scripts, popup page, options page and background
  • Out of the box Eslint and Prettier configurations
  • Intelligence when you change manifest config (only v2)

Major features is by chrome-extension-reloader-webpack-plugin, you can use this plugin to create own your project

Demo Video

chrome-extension-boilerplate.mp4

Usage

# install dependcy
npm i
# development
npm run dev
# build
npm run build
# analy build assets
npm run analy

Manifest Version

change manifest version in package.json, default version is 2

{
  ...
  "chromeExtension": {
    "mainifest-version": 2 or 3
  },
  ...
}

Content Scripts

All content script in contents directory will dynamic generate(There can only be two levels of nestingοΌ‰

contents/test.ts πŸ†—

contents/test/index.ts πŸ†—

contents/test/a.ts 🚫

contents/test/t/index.ts 🚫

React Refresh

This project is using custom plugin https://github.com/njzydark/mini-react-refresh-webpack-plugin

chrome-extension-boilerplate's People

Contributors

njzydark avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.