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

Commitc267b8d

Browse files
committed
Add a note about babel-plugin-rewire
Seejhnns#62
1 parenta4fc3a8 commitc267b8d

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
@@ -188,6 +188,11 @@ myModule.__set__("console", {
188188

189189
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.
190190

191+
**Transpiled ES6 modules**<br>
192+
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).
193+
194+
In this case you should use[babel-plugin-rewire](https://github.com/speedskater/babel-plugin-rewire) instead.
195+
191196
<br />
192197

193198
API

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp