Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Lu <alxlu@users.noreply.github.com>2017-07-24 05:50:55 +0300
committerGitHub <noreply@github.com>2017-07-24 05:50:55 +0300
commitfe5d4e4d5718b56e8cc8c42ebb176d296736003f (patch)
treebc5278b8bc3e66f37d9f323265082f8ac651d3a9 /README.md
parentae9e5d605f17e1ab8503def1542b964b189e9817 (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.md9
1 files changed, 8 insertions, 1 deletions
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