raspasov 2021-04-09T08:06:05.029600Z

0.2.13-SNAPSHOT seems to work for me with

org.clojure/clojurescript {:mvn/version "1.10.844"}

lispers-anonymous 2021-04-09T17:03:45.035400Z

I am having trouble converting my figwheel-main project to use :auto-bundle :webpack and npm libraries. I have everything working with a normal development build with :optimizations set to :none When I attempt to compile with :optimizations set to :simple webpack fails and dumps out a lot of errors that look like this

WARNING in ./resources/public/js/compiled/out/main.js 2200:14094-14116
Module not found: Error: Can't resolve './locale' in '/home/user/work/web-ui/resources/public/js/compiled/out'

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

ERROR in ./resources/public/js/compiled/out/main.js 207:82-98
Module not found: Error: Can't resolve 'React' in '/home/user/work/web-ui/resources/public/js/compiled/out'

ERROR in ./resources/public/js/compiled/out/main.js 207:99-118
Module not found: Error: Can't resolve 'ReactDOM' in '/home/user/work/web-ui/resources/public/js/compiled/out'
Some of the modules it is trying to find (like react), should be reachable through my node_modules. The error about ./locale not being found I suspect comes from my usage of moment-js which I'm still pulling from cljsjs (I do not want to move everything to NPM yet if I can avoid it). Others that it cannot reach I am pulling in through the :foreign-libs option in my figwheel config. The libraries in foreign libs I am loading in through <script> tags in my inital HTML, so I feel like webpack wouldn't need to do anything with those. Has anyone encountered this problem yet? Looking for advice. Thank you.