This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-21
Channels
- # announcements (1)
- # aws-lambda (62)
- # babashka (116)
- # beginners (67)
- # chlorine-clover (39)
- # cider (10)
- # cljs-dev (5)
- # clojure (30)
- # clojure-austin (2)
- # clojure-europe (2)
- # clojure-italy (6)
- # clojure-nl (24)
- # clojure-uk (28)
- # clojurescript (33)
- # data-science (6)
- # datascript (10)
- # datomic (5)
- # duct (39)
- # emacs (1)
- # events (8)
- # fulcro (9)
- # graalvm (29)
- # hoplon (7)
- # juxt (10)
- # malli (4)
- # off-topic (6)
- # pathom (10)
- # perun (1)
- # reagent (45)
- # shadow-cljs (5)
- # sql (14)
- # tools-deps (10)
- # xtdb (9)
I’ve noticed that the :node-script
build target requires node_modules
to run, but the output from :browser
doesn’t. Is it possible to make the :node-script
build work like :browser
such that it doesn’t need to install any node modules?
For my use case I have a code base that runs in several environments; electron, browser, and node server. Most of the NPM dependencies are for the code that runs in the browser, but the node server also uses some of them when it server-side renders.
When releasing the electron version those dependencies should go in "devDependencies"
in the package.json
so that they’re not included in the final build (the :browser
build doesn’t seem to need them). However when I deploy the node server, I do need those dependencies in "dependencies"
so that they’ll be installed on the server (the :node-script
build seems to need them).
Any ideas for the best way to configure this?
@steedman87 you can post-process the node-script output via https://github.com/zeit/ncc or so