Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6ad592e

Browse files
committed
Merge pull requestjhnns#84 from trodrigues/patch-1
Add a note about babel-plugin-rewire
2 parents437c2e0 +c267b8d commit6ad592e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ myModule.__set__("console", {
191191

192192
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.
193193

194+
**Transpiled ES6 modules**<br>
195+
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).
196+
197+
In this case you should use[babel-plugin-rewire](https://github.com/speedskater/babel-plugin-rewire) instead.
198+
194199
<br />
195200

196201
API

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp