This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-26
Channels
- # aleph (5)
- # announcements (16)
- # babashka (36)
- # beginners (161)
- # calva (24)
- # cider (8)
- # circleci (45)
- # clj-kondo (5)
- # cljs-dev (25)
- # cljsrn (5)
- # clojure (116)
- # clojure-europe (10)
- # clojure-nl (18)
- # clojure-uk (14)
- # clojuredesign-podcast (6)
- # clojurescript (50)
- # cursive (12)
- # data-science (8)
- # datomic (8)
- # duct (39)
- # emacs (6)
- # fulcro (21)
- # graalvm (12)
- # kaocha (17)
- # off-topic (184)
- # pathom (1)
- # pedestal (2)
- # re-frame (31)
- # reagent (24)
- # reitit (1)
- # sci (1)
- # shadow-cljs (23)
- # sql (147)
- # tools-deps (8)
- # vrac (3)
- # xtdb (35)
I have a customized shadow.build.targets
target namespace I'm using, currently it just sits in my codebase along with my app. Is there a way I can pull it out of the source tree, but still have it found on the classpath when shadow runs?
I'm trying to use react-markdown
in reagent via shadow-cljs, but I get this error when I require it:
[:app] Build failure:
The required JS dependency "path" is not available, it was required by "node_modules/vfile/core.js".
I found a path-browserify
polyfill, but I got a different error, which lead me to this :
It looks like npm installing path-browserify
and process
is enough to resolve those issues.
I'm trying to output source maps for https://sentry.io/. Setting these keys in the :compiler-options
will output a source map file.
:source-map true
:source-map-include-sources-content true
:source-map-detail-level :all
After adding those keys, however, if I visit my production built app, I receive this warning in the console: "DevTools failed to load SourceMap: Could not parse content for http://localhost:3002/js/main.js.map: Unexpected token < in JSON at position 0". It's clearly trying to load sources maps and getting HTML back, thus the error. My question is if there is a way to output source maps and not have the console attempt to load the source maps. I'm guessing when those above keys are set, the outputted JS has some sort of indicator to tell the browser to attempt to load source maps. In a production build without the above keys set, I do not get the warning message printed in the console.Yes - shadow is including
//# sourceMappingURL=main.js.map
As the last line in the outputted JS. Is there a way to output source maps without this line included in the final JS?I suppose I can do this sed -i '/sourceMappingURL/d' out/public/js/main.js
. Seems like there should be a way to tell shadow to output source maps without the line in the released JS file though.
when developing a chrome extension (one with a bg script, content script as well as devtools panel), in what context does the REPL execute and how to access any of bg, content script or devtools panel?
@eallik since they are 3 different contexts you have 3 different runtimes that you can REPL into
So I'm trying to run tests with a test build target (using :browser-test
as the target), but when I run shadow-cljs watch test
no http server is started. Is my config messed up?
{:target :browser-test
:test-dir "public/js/test"
:devtools {:http-port 8021
:http-root "public/js/test"
:http-handler shadow.http.push-state/handle
}}