Why does the emotion-tailwind-antd example use 2 content scripts

I was using looking at this example to better understand how the framework functioned and I found it weird why inject.tsx was even made. All that it does is check for a tag and then create a div to contain the other elements? Is it for performance? Is it cause the 2nd file has many imports? Then why do both trigger on the same URL? Wouldn't that end up loading both anyway?
GitHub
examples/with-emotion-tailwindcss-antd at 71dc225d272f671520d9bd075...
🔰 Example projects that demonstrate how to use the Plasmo Framework and integrate with popular tools - PlasmoHQ/examples
5 Replies
Shurgbee
ShurgbeeOP•6mo ago
ok I think I kinda get it
Arcane
Arcane•6mo ago
@Shurgbee (formerly truth) has reached level 2. GG!
Shurgbee
ShurgbeeOP•6mo ago
I'm a bit stupid I just needed to read the documentation
Shurgbee
ShurgbeeOP•6mo ago
Plasmo Docs
Life Cycle of Plasmo CSUI – Plasmo
Plasmo's CSUI orchestrates a lifecycle dedicated to mounting and unmounting your React, Vue, or Svelte components in a content script.
Shurgbee
ShurgbeeOP•6mo ago
Basically the inject script adds the Root Container and the plasmo script adds the inline content I think
Want results from more Discord servers?
Add your server