Giter Club home page Giter Club logo

webpack-chrome-extension-launcher's Introduction

Chrome Extension Launcher

Jumptstart your Chrome extension development.

Why

Usually when developing a Chrome extension, you must first go to the chrome://extensions/ page, enable developer mode, load the unpacked extension, select its path, and finally open background page devtools.

This webpack plugin spares you all of those clicks. ๐Ÿ’…

Get Started

Install Chrome Extension Launcher :

npm i -D webpack-chrome-extension-launcher
# or
yarn add -D webpack-chrome-extension-launcher

Add to your Webpack config :

const ChromeExtensionLauncher = require('webpack-chrome-extension-launcher')

module.exports = {
  // your webpack config
  mode: 'development'
  //...
  
  plugins: [new ChromeExtensionLauncher()],
}

๐Ÿš€ A dedicated Chrome instance loaded exclusively with your unpacked extension will launch once after initial compilation (no need to worry about watch mode), with the following perks :

  • Developer mode enabled.
  • chrome://extensions/ as homepage.
  • Background page devtools opened on startup.
  • Webpack process killed on Chrome instance exit.

Options

  • autoDevtools: have Chrome devtools automatically opened in new tabs.
  • launchURL: start Chrome with a custom URL.
  • path: Chrome Extension Launcher looks for an unpacked extension in the output.path property of your webpack config, but you can specify your own path.
new ChromeExtensionLauncher({
  autoDevtools: true,
  launchURL: 'https://github.com',
  path: '/path/to/extension'
})

Production build

Chrome Extension Launcher is automatically disabled in mode: 'production'.

How about

Hot reloading

If you don't want to click on the reload button every time you make a change,
use together with Chrome Extension Reloader from Rubens Pinheiro.

Better logging

If you want to centralize all your logs in the background page,
use together with Web Extension Background Logger from me. ๐Ÿ™‚

webpack-chrome-extension-launcher's People

Contributors

jeremyben avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.