SimplifyJobs/webpack-ext-reloader là dự án Frontend trên GitHub, viết chủ yếu bằng TypeScript, với 110 sao. Add hot reloading to your webpack WebExtension! 🔥
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
A Webpack plugin to automatically reload browser extensions during development.
Installing
For npm:
npm install webpack-ext-reloader --save-dev
For yarn:
yarn add webpack-ext-reloader --dev
What is this?
This is a webpack plugin that brings hot reloading functionality to WebExtensions, essentially resembling webpack-dev-server but for WebExtensions.
This project is a fork of webpack-extension-reloader, maintained and updated by the team at Simplify. The goal is to continue supporting the latest version of webpack (webpack-extension-reloader only supports webpack v4) while introducing new improvements, such as HMR.
Note: This plugin does not support Hot Module Replacement (HMR) yet.
How to use
Using as a plugin
Add webpack-ext-reloader to the plugins section of your webpack configuration file. This plugin does not output the manifest; it might read it for information at most. For outputting not only the manifest.json but other static files as well, use CopyWebpackPlugin.
const ExtReloader = require('webpack-ext-reloader');
plugins: [
new ExtReloader(),
new CopyWebpackPlugin([
{ from: "./src/manifest.json" },
{ from: "./src/popup.html" },
]),
]
... or you can also use some extra options (the following are the default ones):
// webpack.dev.js
module.exports = {
mode: "development", // The plugin is activated only if mode is set to development
watch: true,
entry: {
'content-script': './my-content-script.js',
background: './my-background-script.js',
popup: 'popup',
},
// ...
plugins: [
new ExtReloader({
port: 9090, // Which port use to create the server
reloadPage: true, // Force the reload of the page also
entries: { // The entries used for the content/background scripts or extension pages
contentScript: 'content-script',
background: 'background',
extensionPage: 'popup',
}
}),
// ...
]
}
Note I: Either entry or manifest is needed. If both are provided, the entry will override the information from manifest.json. If neither is provided, the default entry values (as shown above) are used.
Note II: You need to set --mode=development to activate the plugin. If you didn't set it in the webpack.config.js already, you need to run with --watch since the plugin will be able to sign the extension only if webpack triggers the rebuild.
Multiple Content Script and Extension Page support
If your extension uses more than one content script or extension page, like:
Disable auto-reloading of all pages running the plugin
Whenever content or background scripts are modified, the extension will reload. Note: This plugin only works in development mode. Remember to set the NODE_ENV before running the commands above.
Contributing
Before opening any issue or pull request, please refer to the contribution guide.
License
This project is a fork from rubenspgcavalcante/webpack-extension-reloader, which is licensed under the MIT license. All modifications made in this fork are also licensed under the MIT license.
Đọc thêm về SimplifyJobs/webpack-ext-reloader ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/SimplifyJobs/webpack-ext-reloader là nguồn chính thức.
SimplifyJobs/webpack-ext-reloader có bao nhiêu sao?
SimplifyJobs/webpack-ext-reloader có 110 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/SimplifyJobs/webpack-ext-reloader. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
SimplifyJobs/webpack-ext-reloader có phải mã nguồn mở không?
Có — SimplifyJobs/webpack-ext-reloader phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/SimplifyJobs/webpack-ext-reloader.
SimplifyJobs/webpack-ext-reloader còn đang phát triển không?
Commit gần nhất trên SimplifyJobs/webpack-ext-reloader là 12 ngày trước (theo timestamp GitHub). Repo có 32 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
SimplifyJobs/webpack-ext-reloader là gì?
SimplifyJobs/webpack-ext-reloader (SimplifyJobs/webpack-ext-reloader) là dự án TypeScript trên GitHub. Theo mô tả gốc: Add hot reloading to your webpack WebExtension! 🔥
SimplifyJobs/webpack-ext-reloader so với các dự án Frontend khác thế nào?
SimplifyJobs/webpack-ext-reloader được TopGit xếp vào nhóm Frontend, với 110 sao GitHub và viết bằng TypeScript. Xem trang chủ đề Frontend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về webpack-ext-reloader?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về webpack-ext-reloader.