Fork me on GitHub
#shadow-cljs
<
2019-02-27
>
anmonteiro10:02:56

@thheller I think Closure has some polyfill support, does shadow do allow me to polyfill e.g. Promise?

anmonteiro10:02:01

would it just be a matter of seting the output language to :es3for example?

thheller10:02:56

yes, but use :output-feature-set. the :language-out is sort of deprecated. https://shadow-cljs.github.io/docs/UsersGuide.html#_output_language_options

thheller10:02:31

but currently if you use js/Promise from CLJS it won't be polyfilled in development

thheller10:02:39

only in release

anmonteiro10:02:04

that’s fine

anmonteiro10:02:12

what’s the default for output-feature-set?

anmonteiro10:02:40

should that polyfill Promise?

anmonteiro10:02:45

because it wasn’t working in IE11

thheller10:02:15

I think promises are es5? not actually sure

anmonteiro10:02:24

oh > ES5 did not have promises.

anmonteiro10:02:40

so it isn’t polyfilling when it should?

anmonteiro10:02:49

or maybe it doesn’t by default?

thheller10:02:34

ECMAScript® 2015 was that es5 or es6? naming is confusing 😛

anmonteiro10:02:39

that’s es6

thheller10:02:50

you may need to set :compiler-options {:rewrite-polyfills true}

thheller10:02:56

I can never remember if thats on by default or not

thheller15:02:05

@souenzzo @mdhaney 2.8.11 fixes the goog.loader issue on react-native and it should now load properly without errors. can't actually use it due to metro but at least it won't break when loading.

👍 10
5
souenzzo17:02:47

working! thnks

anmonteiro16:02:12

@thheller do you maintain a changelog for shadow?

anmonteiro16:02:33

the changelog in the repo was last updated a year ago 😜

anmonteiro16:02:57

also, would shadow.loader.init work for the CDN use case I mentioned?

thheller17:02:12

@anmonteiro yes that was the intent. set :module-loader-init false in the config an manually call shadow.loader.init(""), so only the prefix

anmonteiro17:02:24

trying that right now

thheller17:02:33

but I'm not too happy with that API so it may change

anmonteiro17:02:48

if you could let me know I’d appreciate it

anmonteiro17:02:55

either here or tag me on a PR or commit?

anmonteiro17:02:00

if you remember

thheller17:02:51

changelog kinda died. still need to set something up that generates that automatically

👍 5
thheller17:02:36

right now @jiyinyiyong kindly generates the release info for https://github.com/thheller/shadow-cljs/releases which is kinda nice

anmonteiro17:02:49

will check that out