Add note about module processing and externs

This commit is contained in:
Juho Teperi 2018-04-03 12:03:26 +03:00
parent b5a04f7d1a
commit 04fdcb248e
1 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,12 @@ the React production build.
When using module processing, it should be possible to split output into several
[modules](https://clojurescript.org/reference/compiler-options#modules).
**Externs are required for use with node modules also!** React created objects
statically in several places and then accesses those dynamically. Closure-compiler
will in these cases rename the statically object properties, which will break
dynamically accessing the objects. Externs fix this by defining which properties
must not be renamed.
## Browser - loading React from CDNJS or custom Webpack bundle
**TODO: Not tested properly**