Giter Site home page Giter Site logo

chrome-extension-boilerplate's Introduction

Chrome Extension Boilerplate

Chrome插件模板

模板参考https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite

开发者指南

  • yarn dev
    修改 index.html 中的脚本为开发对应脚本,然后执行yarn dev

  • yarn build
    生成构建脚本,然后用 chrome 加载已解压的拓展程序引入 dist 文件

注意

  • 后续构建设置emptyOutDirfalse,避免再次打包清除 dist 文件夹
  • 后续构建设置format为 iife,如果不设置,即采用默认方案(esm),页面执行时会声明多次公共模块,从而出现报错。用 iife 可形成函数作用域,避免报错

首次构建采用默认方案(esm),因为background不支持esm,里面引用了chrome模块。如果设置iife,构建会出现报错iife不支持code split(代码拆分)

chrome-extension-boilerplate's People

Contributors

any-u 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.