You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

browser-sync-dev-hot-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-sync-dev-hot-webpack-plugin

Combines BrowserSync, webpack-dev-middleware, and webpack-hot-middleware into one plugin

0.2.2
latest
Source
npm
Version published
Weekly downloads
30
-59.46%
Maintainers
1
Weekly downloads
 
Created
Source

browser-sync-dev-hot-webpack-plugin

NPM version Travis Build Status dependencies Status devDependencies Status Greenkeeper badge

Combines browser-sync, webpack-dev-middleware, and webpack-hot-middleware into one plugin.

Install

npm install --save-dev browser-sync-dev-hot-webpack-plugin

Usage

const BROWSER_SYNC_OPTIONS = {};
const DEV_MIDDLEWARE_OPTIONS = {
    publicPath: '/my/public/path'
};
const HOT_MIDDLEWARE_OPTIONS = {};

const webpackConfig = {
    // Some options...
    plugins: [
        // Other plugins...
        new BrowserSyncHotPlugin({
            browserSync: BROWSER_SYNC_OPTIONS,
            devMiddleware: DEV_MIDDLEWARE_OPTIONS,
            hotMiddleware: HOT_MIDDLEWARE_OPTIONS,
            callback() {
                console.log('Callback');
                /*
                    // Use browser sync server api (https://browsersync.io/docs/api)
                    const { watcher: bs } = this;
                    bs.notify("Hello! It's callback function from BrowserSyncHotPlugin!");
                */
            }
        })
        // Other plugins...
    ]
    // Some options...
};

module.exports = webpackConfig;

Options

See related packages docs.

  • browser-sync - Keep multiple browsers & devices in sync when building websites.

  • webpack-dev-middleware - Offers a dev middleware for webpack, which arguments a live bundle to a directory.

  • webpack-hot-middleware - Webpack hot reloading you can attach to your own server.

Contribution

Feel free to push your code if you agree with publishing under the MIT license.

Changelog

License

Keywords

webpack

FAQs

Package last updated on 26 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts