binaryage/chromex

Can't use datascript at the same time in popup and background

yqrashawn opened this issue · 1 comments

There's a datascript not defined error in popup page if I put datascript.core/create-conn in both background.core and popup.core.
Once I deleted the datascript code in background.core, the error went away and datascript works in popup.

Can be reproduced in shadow example as this commit.

yqrashawn@e66dc616

Is this the supposed way and I misunderstand some concepts in chrome extension or shadow-cljs?

I've been seeing similar behaviour with some other libs/requires too. E.g. the storage api or reagent. Is this some limitation for chrome extensions in general or maybe there is something in shadow build config that could solve this?
Thanks!