From 04fdcb248e4c87b50ba99f6f4e905ac11c087c5d Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Tue, 3 Apr 2018 12:03:26 +0300 Subject: [PATCH] Add note about module processing and externs --- docs/0.8-upgrade.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/0.8-upgrade.md b/docs/0.8-upgrade.md index 2837000..efe54d8 100644 --- a/docs/0.8-upgrade.md +++ b/docs/0.8-upgrade.md @@ -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**