我正在开发两个相关的web应用程序,这两个应用程序都依赖于第三个本地项目,因为它们拥有共同的代码。
在编辑签出依赖项时,如何让figwheel重新构建和重新加载代码?
发布于 2017-07-27 11:24:10
目前,Figwheel不会自动检测leiningen结帐。您需要将签出源代码的源路径直接添加到cljsbuild :source-paths中。例如,如果你有像这样的东西
:cljsbuild {:builds [{:id "dev"
:source-paths ["src" "dev"]
:figwheel {:on-jsload 'my.main/mount-gui}
:compiler {:output-to ...
:output-dir ...
:main 'my.main
...然后,您需要将其更改为
:cljsbuild {:builds [{:id "dev"
;; Add checkouts path here
:source-paths ["src" "dev" "checkouts/my-project/src"]
:figwheel {:on-jsload 'my.main/mount-gui}
:compiler {:output-to ...
:output-dir ...
:main 'my.main
...一旦for知道了你的签出项目的源代码路径,它应该在任何更改后自动重新编译,并重新加载代码,就像它对主项目中的代码所做的那样。
我正在开发一个pull request来修复这个issue,它应该会让它在未来自动工作。
https://stackoverflow.com/questions/45288720
复制相似问题