diff options
author | Alex Lu <alxlu@users.noreply.github.com> | 2017-07-24 05:50:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 05:50:55 +0300 |
commit | fe5d4e4d5718b56e8cc8c42ebb176d296736003f (patch) | |
tree | bc5278b8bc3e66f37d9f323265082f8ac651d3a9 /README.md | |
parent | ae9e5d605f17e1ab8503def1542b964b189e9817 (diff) |
Only show json-loader requirement for webpack 1.x
json-loader is included in webpack 2 and up: https://webpack.js.org/guides/migrating/#json-loader-is-not-required-anymore
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -176,7 +176,13 @@ to browserify. However, webpack requires the following extra configuration: target: 'web', node: { fs: 'empty' - }, + } +} +``` + +If you are on webpack 1.x, you will also need to add the `json-loader`: +```js +{ module: { loaders: [ // make sure to install the 'json-loader' package: npm install json-loader @@ -188,6 +194,7 @@ to browserify. However, webpack requires the following extra configuration: } } ``` + Otherwise you could also directly use the pre-built version via `require('webtorrent/webtorrent.min')`. ##### Script tag |