PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.16k stars 352 forks source link

[BUG] NX & React - No rendering of content scripts ui #779

Open lionelhorn opened 11 months ago

lionelhorn commented 11 months ago

What happened?

Using nx in "integrated repo" mode https://nx.dev/concepts/integrated-vs-package-based#integrated-repos, there is sometimes no package.json for each package.

If you're using react and have set it as dependency in your repo's root package and not in the extension package, the parcel runtime doesn't seem to detect it.

https://github.com/PlasmoHQ/plasmo/blob/0c8e4fcd5d36772c4d4674dc96c84a1749ce4af6/core/parcel-runtime/src/index.ts#L39

It may build and produce a build but it will not render your content scripts ui.

Version

Latest

What OS are you seeing the problem on?

No response

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

bingjian1819 commented 8 months ago

Yeah, I also found this problem, does anyone know how to solve it?