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

Open
#20 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
clojure
Domain
frontend

Research direction

Reproduce the shadow example from commit e66dc616, starting with the datascript.core/create-conn usage in background.core and popup.core. Check why the popup reports datascript as undefined when both entry points use it; done means either both contexts work together or the supported limitation and required setup are documented.

Written by the indexing model from the issue text.

Description

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.

https://github.com/yqrashawn/chromex/commit/e66dc616

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

Dominant language
Clojure
Stars
413
Forks
20
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from binaryage/chromex

All issues in binaryage/chromex

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.