Skip to content

Commit

Permalink
Release version 2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
milankinen committed May 10, 2016
2 parents ef592b4 + 3f9fd93 commit aaf137d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ Configures the reload client to use the given hostname when connecting to the
reload server. You may need this if you are running the bundle in an another device.
Default value is `localhost`

#### `--no-dedupe`

Disables Browserify module de-duplication. By default, de-duplication is enabled.
However, sometimes this de-duplication with may cause an invalid bundle with LiveReactload.
You can disable this de-duplication by using this flag.

#### `--no-client`

Omits the reload client from the generated bundle.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "livereactload",
"version": "2.2.1",
"version": "2.2.3",
"description": "Live code editing with Browserify and React",
"author": "Matti Lankinen <[email protected]> (https://github.com/milankinen)",
"license": "MIT",
Expand Down
15 changes: 12 additions & 3 deletions src/browserify-plugin/main.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import through from "through2"
import {startServer} from "./reloadServer"
import makeHash from "./makeHash"
import {readFileSync} from "fs"
import {resolve, dirname, basename} from "path"
import makeHash from "./makeHash"
import {startServer} from "./reloadServer"
import {log} from "./console"
import {values} from "../common"


module.exports = function LiveReactloadPlugin(b, opts = {}) {
const {
port = 4474,
host = null,
client = true
client = true,
dedupe = true
} = opts

// server is alive as long as watchify is running
Expand Down Expand Up @@ -72,6 +74,13 @@ module.exports = function LiveReactloadPlugin(b, opts = {}) {
b.pipeline.on("error", server.notifyBundleError)
}

if (!dedupe) {
b.pipeline.splice('dedupe', 1, through.obj())
if (b.pipeline.get('dedupe')) {
log("Other plugins have added de-duplicate transformations. --no-dedupe is not effective")
}
}

// task of this hook is to override the default entry so that
// the new entry
b.pipeline.get("record").push(through.obj(
Expand Down

0 comments on commit aaf137d

Please sign in to comment.