webworkify-webpack2

1.1.9 • Public • Published

webworkify-webpack2

Launch a web worker that can require() in the browser with webpack 2.

This fork of webworkify-webpack should only be used as an alias for original webworkify with webpack 2. It lets libraries that has webworkify dependency to be used with webpack 2 (e.g. videojs-contrib-hls).

how to use

First, replace webworkify with webworkify-webpack2 by creating an alias in your webpack config:

resolve: {
  alias: {
    webworkify: 'webworkify-webpack2'
  }
}

Then use the library you are trying to integrate as you would normally do:

import 'videojs-contrib-hls';

install

With npm do:

npm install webworkify-webpack2 --save

caveats

  • While developing make sure not to set webpack's devtool option to be with some eval configuration because from 1.1.0 version it won't work - check #7
  • When passing anonymous functions to webworkify-webpack2, naming them can prevent potential issues - #9, #10

license

MIT

Package Sidebar

Install

npm i webworkify-webpack2

Weekly Downloads

1

Version

1.1.9

License

MIT

Last publish

Collaborators

  • cansin