现在在开发页面时,通过构建实现热加载已经很普遍。但是在开发扩展时,由于扩展的刷新和页面不同,所以需要对构建做一些特殊处理。本项目就是在开发扩展时,使沟通实现自动刷新的功能的构建模板。 代码中主要添加了以下几点:
- 将webpack的构建结果输出到硬盘。(扩展调试需要引入一个目录)
- entry在构建时确定。(Content Script个数不确定)
- 在background.js中添加reload方法,通过监听message事件来自动刷新扩展。(修改代码后,自动刷新扩展)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.