This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-06
Channels
- # babashka-sci-dev (56)
- # beginners (13)
- # biff (3)
- # calva (24)
- # cider (2)
- # clj-together (2)
- # clojure (38)
- # clojure-europe (6)
- # clojure-norway (2)
- # clojurescript (1)
- # cursive (5)
- # introduce-yourself (3)
- # pedestal (4)
- # polylith (5)
- # portal (11)
- # re-frame (7)
- # reitit (6)
- # shadow-cljs (12)
- # spacemacs (5)
- # sql (7)
- # tools-deps (1)
@lilactown should be fine in 1.17.7, it did in fact use the incorrect package.json for "browser"
overrides
thanks @U05224H0W. appreciate it
Hi, I've seen some cljs ns
with {:skip-goog-provide true}
https://github.com/thheller/shadow-cljsjs/blob/master/src/main/firebase/app.cljs. Is it specific to shadow-cljs only?
(ns
{:skip-goog-provide true}
(:require ["@firebase/app" :refer (firebase)]))
Thanks. Looks like the goog.provide overwrites the firebase object here causing undefined initializeApp
// Input 293
var firebase = {app:{}}; <------------------------------------------------------------- goog.provide?????
firebase.app.node$module$_CIRCA_firebase$app = __webpack_require__(5752);
console.log("\x3d\x3d\x3d JAIME \x3d\x3d\x3d firebase \x3d\x3d\x3d ", firebase.app.node$module$_CIRCA_firebase$app);
console.log("\x3d\x3d\x3d JAIME \x3d\x3d\x3d (.-initializeApp firebase) \x3d\x3d\x3d ", firebase.app.node$module$_CIRCA_firebase$app.initializeApp);
console.log("\x3d\x3d\x3d JAIME \x3d\x3d\x3d firebase.initializeApp \x3d\x3d\x3d ", firebase.app.node$module$_CIRCA_firebase$app.initializeApp);
goog.exportSymbol("firebase", firebase.app.node$module$_CIRCA_firebase$app);
// Input 294
com.degel = {};
com.degel.re_frame_firebase = {};
com.degel.re_frame_firebase.core = {};
if ("undefined" === typeof com || "undefined" === typeof com.degel || "undefined" === typeof com.degel.re_frame_firebase || "undefined" === typeof com.degel.re_frame_firebase.core || "undefined" === typeof com.degel.re_frame_firebase.core.firebase_state) {
com.degel.re_frame_firebase.core.firebase_state = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
}
com.degel.re_frame_firebase.core.set_firebase_state = function($var_args$$) {
for (var $args__4824__auto__$jscomp$316_argseq__4825__auto__$$ = [], $len__4818__auto___51875$$ = arguments.length, $i__4819__auto___51876$$ = 0;;) {
if ($i__4819__auto___51876$$ < $len__4818__auto___51875$$) {
$args__4824__auto__$jscomp$316_argseq__4825__auto__$$.push(arguments[$i__4819__auto___51876$$]), $i__4819__auto___51876$$ += 1;
} else {
break;
}
}
$args__4824__auto__$jscomp$316_argseq__4825__auto__$$ = 0 < $args__4824__auto__$jscomp$316_argseq__4825__auto__$$.length ? new cljs.core.IndexedSeq($args__4824__auto__$jscomp$316_argseq__4825__auto__$$.slice(0), 0, null) : null;
return com.degel.re_frame_firebase.core.set_firebase_state.cljs$core$IFn$_invoke$arity$variadic($args__4824__auto__$jscomp$316_argseq__4825__auto__$$);
};
com.degel.re_frame_firebase.core.set_firebase_state.cljs$core$IFn$_invoke$arity$variadic = function($JSCompiler_temp_const$jscomp$9$$) {
$JSCompiler_temp_const$jscomp$9$$ = cljs.core.__destructure_map.call(null, $JSCompiler_temp_const$jscomp$9$$);
var $JSCompiler_temp_const$$ = cljs.core.get.call(null, $JSCompiler_temp_const$jscomp$9$$, new cljs.core.Keyword(null, "get-user-sub", "get-user-sub", 1337447940)), $JSCompiler_temp_const$jscomp$0$$ = cljs.core.get.call(null, $JSCompiler_temp_const$jscomp$9$$, new cljs.core.Keyword(null, "set-user-event", "set-user-event", -2139443858)), $JSCompiler_inline_result$$ = cljs.core.get.call(null, $JSCompiler_temp_const$jscomp$9$$, new cljs.core.Keyword(null, "default-error-handler", "default-error-handler",
2070828115));
$JSCompiler_temp_const$jscomp$9$$ = cljs.core.swap_BANG_;
var $JSCompiler_temp_const$jscomp$1$$ = $JSCompiler_temp_const$jscomp$9$$.call, $JSCompiler_temp_const$jscomp$2$$ = com.degel.re_frame_firebase.core.firebase_state, $JSCompiler_temp_const$jscomp$3$$ = cljs.core.assoc, $JSCompiler_temp_const$jscomp$4$$ = new cljs.core.Keyword(null, "set-user-fn", "set-user-fn", -1107518278);
$JSCompiler_temp_const$jscomp$0$$ = iron.re_utils.event__GT_fn.call(null, $JSCompiler_temp_const$jscomp$0$$);
var $JSCompiler_temp_const$jscomp$5$$ = new cljs.core.Keyword(null, "get-user-fn", "get-user-fn", -1714413522);
$JSCompiler_temp_const$$ = iron.re_utils.sub__GT_fn.call(null, $JSCompiler_temp_const$$);
var $JSCompiler_temp_const$jscomp$6$$ = new cljs.core.Keyword(null, "default-error-handler", "default-error-handler", 2070828115), $JSCompiler_temp_const$jscomp$7$$ = iron.re_utils.event__GT_fn, $JSCompiler_temp_const$jscomp$8$$ = $JSCompiler_temp_const$jscomp$7$$.call;
$JSCompiler_inline_result$$ = cljs.core.truth_($JSCompiler_inline_result$$) ? $JSCompiler_inline_result$$ : alert;
return $JSCompiler_temp_const$jscomp$1$$.call($JSCompiler_temp_const$jscomp$9$$, null, $JSCompiler_temp_const$jscomp$2$$, $JSCompiler_temp_const$jscomp$3$$, $JSCompiler_temp_const$jscomp$4$$, $JSCompiler_temp_const$jscomp$0$$, $JSCompiler_temp_const$jscomp$5$$, $JSCompiler_temp_const$$, $JSCompiler_temp_const$jscomp$6$$, $JSCompiler_temp_const$jscomp$8$$.call($JSCompiler_temp_const$jscomp$7$$, null, $JSCompiler_inline_result$$));
};
com.degel.re_frame_firebase.core.set_firebase_state.cljs$lang$maxFixedArity = 0;
com.degel.re_frame_firebase.core.set_firebase_state.cljs$lang$applyTo = function($seq51872$$) {
return this.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq.call(null, $seq51872$$));
};
com.degel.re_frame_firebase.core.initialize_app = function($firebase_app_info$$) {
return firebase.initializeApp(cljs.core.clj__GT_js.call(null, $firebase_app_info$$)); <--------------------------- initializeApp is not a function
};
Thanks for confirming. I think I'll just have to write script to delete that line for now 😅