简体   繁体   中英

How to place Clojurescript npm-deps in production setup?

this is a simple question, but I have been puzzling over it for a while now and it doesn't have much documentation to look at:

I've got a development setup with ClojureScript, figwheel, npm deps working just fine for me. But when I produce a production, compiled JS file, it does not find the npm dependency files. So where and how do I place which of these packages in the production web server, so that they will be found and loaded?

Regards, Chris

All files required to run your JS will be included in the compilation output after :advanced optimizations. No node_modules files will be required at all so there should not be any need to place them anywhere. Only the files produced by the build directly should be loaded.

:npm-deps however is an alpha feature with many known issues. You can use alternate solutions like webpack or shadow-cljs which work much more reliable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM