From 30b27d17b6dcdd2b17efad8ec085746beac24680 Mon Sep 17 00:00:00 2001 From: Matti Lankinen Date: Fri, 1 Apr 2016 00:40:18 +0300 Subject: [PATCH 1/4] Release version 2.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 622d517..854486d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "livereactload", - "version": "2.2.1", + "version": "2.2.2", "description": "Live code editing with Browserify and React", "author": "Matti Lankinen (https://github.com/milankinen)", "license": "MIT", From b72bdca35fb2ad34558ec3e84367698a74346582 Mon Sep 17 00:00:00 2001 From: Matti Lankinen Date: Tue, 10 May 2016 09:48:02 +0300 Subject: [PATCH 2/4] Add --no-dedupe option in order to disable module de-duplication --- src/browserify-plugin/main.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/browserify-plugin/main.js b/src/browserify-plugin/main.js index 86c64ad..aeafcc1 100644 --- a/src/browserify-plugin/main.js +++ b/src/browserify-plugin/main.js @@ -1,8 +1,9 @@ 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" @@ -10,7 +11,8 @@ 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 @@ -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( From 97841f4191b3500de822b4c83481b8a3ca735777 Mon Sep 17 00:00:00 2001 From: Matti Lankinen Date: Tue, 10 May 2016 09:50:07 +0300 Subject: [PATCH 3/4] Update docs --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 2632548..4175696 100644 --- a/README.md +++ b/README.md @@ -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. From 3f9fd938961ad2bfa0c27ad42b6329ea9660fe5b Mon Sep 17 00:00:00 2001 From: Matti Lankinen Date: Tue, 10 May 2016 09:50:18 +0300 Subject: [PATCH 4/4] Version 2.2.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 854486d..5ac61a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "livereactload", - "version": "2.2.2", + "version": "2.2.3", "description": "Live code editing with Browserify and React", "author": "Matti Lankinen (https://github.com/milankinen)", "license": "MIT",