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

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ewald <mail@johannesewald.de>2016-03-16 02:20:29 +0300
committerJohannes Ewald <mail@johannesewald.de>2016-03-16 02:20:29 +0300
commit6ad592edbd263ca9da4d154e2ffc7ab15de18112 (patch)
treefbe8e76b0512503fd2cb74cd1c732cdd6e3b7773 /README.md
parent437c2e028e17fdbc9bc6a75a02a5e7af4eaaeeff (diff)
parentc267b8d8da52efdd54a9fa12ac85e0bcee94c20d (diff)
Merge pull request #84 from trodrigues/patch-1
Add a note about babel-plugin-rewire
Diffstat (limited to 'README.md')
-rw-r--r--README.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/README.md b/README.md
index fbb30a1..dd3c548 100644
--- a/README.md
+++ b/README.md
@@ -191,6 +191,11 @@ myModule.__set__("console", {
This replaces `console` just inside `myModule`. That is, because rewire is using `eval()` to turn the key expression into an assignment. Hence, calling `myModule.__set__("console.log", fn)` modifies the `log` function on the *global* `console` object.
+**Transpiled ES6 modules**<br>
+If you are using Babel with ES6 rewire does not know how to mock the top level references in a module because Babel has remapped them (see #62).
+
+In this case you should use [babel-plugin-rewire](https://github.com/speedskater/babel-plugin-rewire) instead.
+
<br />
API