From fe5d4e4d5718b56e8cc8c42ebb176d296736003f Mon Sep 17 00:00:00 2001 From: Alex Lu Date: Sun, 23 Jul 2017 19:50:55 -0700 Subject: 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 --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5073f49..c5bde53 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.2.3