Update Cljsjs for extern fix

New externs fix isTextInputElement.supportedInputTypes function so range
input works with optimizations.

Fixes #321
This commit is contained in:
Juho Teperi 2018-04-03 11:56:49 +03:00
parent 8f6444586c
commit b5a04f7d1a
2 changed files with 25 additions and 9 deletions

View File

@ -3,12 +3,14 @@
The necessary changes depend on what environment you target, and The necessary changes depend on what environment you target, and
how you want to provide React. how you want to provide React.
While Reagent 0.8 supports use with React from npm, there are known problems.
| | Build | Browser | Node | | | Build | Browser | Node |
|---|---|---|---| |---|---|---|---|
| Cljsjs | `:none` | Supported | Requires Cljs 1.10.238+ | | Cljsjs | `:none` | Supported | Requires Cljs 1.10.238+ |
| Cljsjs | `:advanced` | Supported | Requires Cljs 1.10.238+ | | Cljsjs | `:advanced` | Supported | Requires Cljs 1.10.238+ |
| `node modules` | `:none` | Partially supported (1) | Supported | | `node modules` | `:none` | Known problems (1) | Supported |
| `node modules` | `:advanced` | Partially supported (2) | Supported | | `node modules` | `:advanced` | Known problems (2) | Supported |
1. Closure can't properly handle React 16 CommonJS module pattern: https://github.com/google/closure-compiler/issues/2841 1. Closure can't properly handle React 16 CommonJS module pattern: https://github.com/google/closure-compiler/issues/2841
This causes the production React code being loaded even for development builds. This causes the production React code being loaded even for development builds.
@ -37,6 +39,9 @@ builds. ClojureScript compiler will automatically set this constant to
`production` value when using `:advanced` optimizations. This enables `production` value when using `:advanced` optimizations. This enables
the React production build. 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).
## Browser - loading React from CDNJS or custom Webpack bundle ## Browser - loading React from CDNJS or custom Webpack bundle
**TODO: Not tested properly** **TODO: Not tested properly**

View File

@ -8,9 +8,9 @@
;; If :npm-deps enabled, these are used only for externs. ;; If :npm-deps enabled, these are used only for externs.
;; Without direct react dependency, other packages, ;; Without direct react dependency, other packages,
;; like react-leaflet might have closer dependency to a other version. ;; like react-leaflet might have closer dependency to a other version.
[cljsjs/react "16.3.0-0"] [cljsjs/react "16.3.0-1"]
[cljsjs/react-dom "16.3.0-0"] [cljsjs/react-dom "16.3.0-1"]
[cljsjs/react-dom-server "16.3.0-0"] [cljsjs/react-dom-server "16.3.0-1"]
[cljsjs/create-react-class "15.6.2-0"]] [cljsjs/create-react-class "15.6.2-0"]]
:plugins [[lein-cljsbuild "1.1.7"] :plugins [[lein-cljsbuild "1.1.7"]
@ -28,7 +28,7 @@
[doo "0.1.10"] [doo "0.1.10"]
[cljsjs/prop-types "15.6.0-0"]] [cljsjs/prop-types "15.6.0-0"]]
:source-paths ["demo" "examples/todomvc/src" "examples/simple/src" "examples/geometry/src"] :source-paths ["demo" "examples/todomvc/src" "examples/simple/src" "examples/geometry/src"]
:resource-paths ["site" "target/cljsbuild/client"]}} :resource-paths ["site" "target/cljsbuild/client" "target/cljsbuild/client-npm"]}}
:clean-targets ^{:protect false} [:target-path :compile-path "out"] :clean-targets ^{:protect false} [:target-path :compile-path "out"]
@ -58,9 +58,8 @@
:source-map true :source-map true
:optimizations :none :optimizations :none
:main "reagentdemo.dev" :main "reagentdemo.dev"
;; Same output dir as :client build! :output-dir "target/cljsbuild/client-npm/public/js/out"
:output-dir "target/cljsbuild/client/public/js/out" :output-to "target/cljsbuild/client-npm/public/js/main.js"
:output-to "target/cljsbuild/client/public/js/main.js"
:asset-path "js/out" :asset-path "js/out"
;; add process.env.node_env preload ;; add process.env.node_env preload
; :npm-deps true ; :npm-deps true
@ -130,6 +129,18 @@
;; :pseudo-names true ;; :pseudo-names true
:output-to "target/cljsbuild/prod/public/js/main.js" :output-to "target/cljsbuild/prod/public/js/main.js"
:output-dir "target/cljsbuild/prod/out" ;; Outside of public, not published :output-dir "target/cljsbuild/prod/out" ;; Outside of public, not published
:npm-deps false}}
:prod-npm
{:source-paths ["src" "demo"]
:compiler {:main "reagentdemo.prod"
:optimizations :advanced
:elide-asserts true
:pretty-print false
:pseudo-names true
:output-to "target/cljsbuild/prod-npm/public/js/main.js"
:output-dir "target/cljsbuild/prod-npm/out" ;; Outside of public, not published
:process-shim true
:closure-warnings {:global-this :off}}} :closure-warnings {:global-this :off}}}
:prod-test :prod-test