Skip to content
Browse files

fix :js-options :resolve package to false

prevents a npm require from being included in the package and was
previously broken due to a bad `or` use
  • Loading branch information
thheller committed Sep 20, 2018
1 parent f6694aa commit a61eea6d7f74fb7d0d806bc030442cf554ab5a24
Showing with 7 additions and 3 deletions.
  1. +1 −1 src/main/shadow/build/npm.clj
  2. +6 −2 src/main/shadow/build/resolve.clj
@@ -313,7 +313,7 @@
"zlib" "browserify-zlib"})

(def empty-rc
(let [ns 'shadow.empty]
(let [ns 'shadow$empty]
{:resource-id [::empty "shadow$empty.js"]
:resource-name "shadow$empty.js"
:output-name "shadow$empty.js"
@@ -91,8 +91,12 @@
;; "./something.js" would override anything from any package
;; just assume ppl will only override packages for now
(let [resolve-cfg
(or (get-in require-ctx [:resolve require])
(get global-resolve-config require))]
(let [x (get-in require-ctx [:resolve require])]
;; can't use `or` since `false` is a legal return
(if-not (nil? x)
(get global-resolve-config require)

(if (false? resolve-cfg)

0 comments on commit a61eea6

Please sign in to comment.
You can’t perform that action at this time.