Fix Code Splitting example for ClojureScirpt 1.11+ #334
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the following two things:
Incorrect script paths in
Index.html
Figwheel serves the static files from the
target/public/
folder so thetarget
prefix in thetarget/cljs-out/*.js
script src paths are incorrect.This commit fixes the script paths in the index.html host page so the browser
doesn't show 404 responses for the compiled js files.
goog.dom.createDom
error in cljs 1.11+The
goog.dom/createDom
function requires a second argument ofopt_attributes
. (See official documentation athttps://google.github.io/closure-library/api/goog.dom.html.) In previous
ClojureScript versions, the
goog.dom/createDom
function was able to handle thenonexistence of
opt_attributes
argument, miraculously. However, withClojureScript 1.11.60, this is considered an error:
This PR fixes the errors above and is tested on both ClojureScript 1.11.60
and ClojureScript 1.10.773.
See https://github.com/dawranliou/figwheel-main-code-splitting-demo for the
working demo.