All Projects → webextension-toolbox → Webpack Webextension Plugin

webextension-toolbox / Webpack Webextension Plugin

Licence: other
Webpack plugin that compiles WebExtension manifest.json files and adds smart auto reload

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Webpack Webextension Plugin

Webextension Toolbox
Small CLI toolbox for cross-browser WebExtension development
Stars: ✭ 365 (+676.6%)
Mutual labels:  webpack, firefox, webextension
Context Search
A Firefox WebExtension that displays a context menu, that searches for the selected text.
Stars: ✭ 26 (-44.68%)
Mutual labels:  firefox, webextension
Google Music Hotkeys
Browser extension that adds keyboard control to Google / YouTube Music
Stars: ✭ 25 (-46.81%)
Mutual labels:  firefox, webextension
Ext Saladict
🥗 All-in-one professional pop-up dictionary and page translator which supports multiple search modes, page translations, new word notebook and PDF selection searching.
Stars: ✭ 8,418 (+17810.64%)
Mutual labels:  firefox, webextension
Prerender Spa Plugin
Prerenders static HTML in a single-page application.
Stars: ✭ 7,018 (+14831.91%)
Mutual labels:  webpack, webpack-plugin
Spring Streaming
SPA on Spring Boot 1.x, WebSockets and React, gradle, nodejs, spring-boot, gradle multi project, spring-mvc, spring-data, gradle dependency update plugin, react-router
Stars: ✭ 6 (-87.23%)
Mutual labels:  webpack, websockets
Webpack Common Shake
CommonJS Tree Shaker plugin for WebPack
Stars: ✭ 875 (+1761.7%)
Mutual labels:  webpack, webpack-plugin
Webpack Config Plugins
Provide best practices for webpack loader configurations
Stars: ✭ 529 (+1025.53%)
Mutual labels:  webpack, webpack-plugin
Event Hooks Webpack Plugin
Event hooks plugin for webpack
Stars: ✭ 30 (-36.17%)
Mutual labels:  webpack, webpack-plugin
Webpack Alioss Plugin
阿里 oss-webpack 自动上传插件
Stars: ✭ 35 (-25.53%)
Mutual labels:  webpack, webpack-plugin
Webpack Aliyun Oss
一个webpack(version >= 4)插件,上传资源到阿里云oss。可以作为webpack插件使用,也可独立使用
Stars: ✭ 36 (-23.4%)
Mutual labels:  webpack, webpack-plugin
Error Overlay Webpack Plugin
Catch errors with style 💥✨
Stars: ✭ 821 (+1646.81%)
Mutual labels:  webpack, webpack-plugin
Duplicate Package Checker Webpack Plugin
🕵️ Webpack plugin that warns you when a build contains multiple versions of the same package
Stars: ✭ 635 (+1251.06%)
Mutual labels:  webpack, webpack-plugin
Cloudflare Workers Webpack Plugin
Launch Cloudflare Workers to the Edge from the comfort of your build step 🚀
Stars: ✭ 18 (-61.7%)
Mutual labels:  webpack, webpack-plugin
Webpack Deep Scope Analysis Plugin
A webpack plugin for deep scope analysis
Stars: ✭ 589 (+1153.19%)
Mutual labels:  webpack, webpack-plugin
Tabmarks
Web Extension for handling groups of tabs persisted as bookmarks
Stars: ✭ 13 (-72.34%)
Mutual labels:  firefox, webextension
Cookie Autodelete
Firefox and Chrome WebExtension that deletes cookies and other browsing site data as soon as the tab closes, domain changes, browser restarts, or a combination of those events.
Stars: ✭ 1,015 (+2059.57%)
Mutual labels:  firefox, webextension
Webextension Pixiv Toolkit
A web extension for Pixiv
Stars: ✭ 513 (+991.49%)
Mutual labels:  firefox, webextension
Optimize Plugin
Optimized Webpack Bundling for Everyone. Intro ⤵️
Stars: ✭ 525 (+1017.02%)
Mutual labels:  webpack, webpack-plugin
Pulse
We're building the next generation of Firefox, and we're focusing on real-world speed and performance. Pulse lets you give our engineers feedback about your experience on websites that work well in Firefox and on websites that don't.
Stars: ✭ 15 (-68.09%)
Mutual labels:  firefox, webextension

Webpack WebExtension Plugin

npm package JavaScript Style Guide license

Webpack plugin that compiles web-extension manifest.json files and adds smart auto reload.

What does it do?

  • Autoreload extensions via websockets
  • Use vendor prefixes in manifest properties
  • Validates some manifest.json fields

Install

$ npm i webpack-webextension-plugin

Usage

const WebextensionPlugin = require('webpack-webextension-plugin')

const config = {
  plugins: [
    new WebextensionPlugin({
      vendor: 'chrome'
    })
  ]
}

API

new WebextensionPlugin([options])

Add result to webpack plugins to initialize.

options

Type: Object

Any of the options below.

vendor

Type: String
Default: chrome
Any of: chrome, opera, firefox, edge, safari

Used for vendor prefixing in the manifest.json. More infos regarding this can be found below.

port

Type: Integer
Default: 35729

Specify the listening port for the webstocket development server.

autoreload

Type: Boolean
Default: true

Enables auto reload. If not specified will be enabled when using webpacks watch mode.

quiet

Type: Boolean
Default: false

Disable plugin logging.

reconnectTime

Type: Integer
Default: 3000

Specify the reconnect time to the development server from the extension side.

manifestDefaults

Type: Object
Default: {}

Allows you to define defaults for the manifest.json file.

FAQ

How does smart autoreload work?

We create/extend a background page in the extension with a websockets client, that connects to our custom websocket server. As soon as a specific files changes the client checks how to reload the extension:

  • if manifest.json change → full reload
  • if manifest.json dependencies change → full reload
  • if _locales change → full reload
  • else reload current tab & all extension views

What are vendor prefixed manifest keys?

Vendor prefixed manifest keys allow you to write one manifest.json for multible vendors.

{
  "__chrome__name": "SuperChrome",
  "__firefox__name": "SuperFox",
  "__edge__name": "SuperEdge",
  "__opera__name": "SuperOpera",
  "__safari__name": "SuperSafari"
}

if the vendor is chrome this compiles to:

{
  "name": "SuperChrome",
}

Add keys to multiple vendors by seperating them with | in the prefix

{
  __chrome|opera__name: "SuperBlink"
}

if the vendor is chrome or opera, this compiles to:

{
  "name": "SuperBlink"
}

Why are you not using mozillas web-ext package?

  • webpack-webextension-plugin should work for every browser in the same way.
  • web-ext only works for firefox. Nevertheless if your primary browser is firefox, you should definetly check it out.

Links

License

Copyright 2018 Henrik Wenz

This project is free software released under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].