Coder Social home page Coder Social logo

crx3-webpack-plugin's Introduction

crx3-webpack-plugin

A Webpack plugin to bundle chrome extensions for CRX3. The api is essentially identical to crx-webpack-plugin, and you can simply swap the two and go.

Inspired or enabled by the following projects:

crx-webpack-plugin

crx3

API

add the plugin

yarn add -D crx3-webpack-plugin

require it:

const crx3 = require('crx3-webpack-plugin');

configure the plugin:

// webpack.config.js

module.exports = {
  entry: //...,
  output: //...,
  plugins: [
    new crx3({
      updateUrl: 'url-to-update.xml',
      updateFilename: 'update.xml',
      keyFile: './build.pem',
      contentPath: './build',
      outputPath: './dist',
      name: 'my-extension.crx',
      zip: true,
      browserVersion: '64.0.3242'
   })
  ]
}

Configuration Settings:

Option Required Type Default About
contentPath yes string none location of build files. should be the webpack output folder to consume your bundle(s).
outputPath yes string none where to export the built extension.
keyFile no string generates build.pem a private key required to update the extension.
name no string 'crx' the name of the built extension
updateUrl no string none where to find updates.xml
updateFilename no string name filename for updates.xml
zip no boolean false provides a zip of the build files along with the CRX.
browserVersion no string none specify a minimum browser version for the app.

Note: your build process should copy your manifest.json to outputPath before the plugin runs, or it will fail.

Important Note: CRX_REQUIRED_PROOF_MISSING

See crx3 for further details. Essentially, due to tightening regulations regarding the sources of chrome extensions, most users will be unable to install extensions built with this plugin, and it will be difficult to update them. This plugin therefore is probably not suitable for public Chrome Extensions. Your best bet is probably to bundle your application via Webpack and build and distribute manually through the web store. This plugin is useful for managing enterprise plugins however, provided that you're able to enforce a managed policy.

crx3-webpack-plugin's People

Contributors

entrptaher avatar

Watchers

James Cloos 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.