PlasmoHQ / plasmo

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

[BUG] CSUI not rendered in production build #1070

Closed adibzter closed 1 week ago

adibzter commented 1 month ago

What happened?

This simple code in content.tsx is not rendered in the production build. In dev mode, it is rendered as intended.

import React from 'react';

const Overlay = () => {
  return (
    <>
      <p>hahahahah</p>
    </>
  );
};

export default Overlay;

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

sleekslush commented 1 month ago

This definitely works in a quick test that I just ran. Need more details.

adibzter commented 1 month ago

My bad. I have content.ts and content.tsx. I thought content.tsx is relying on content.ts since in the docs mentioned:

https://docs.plasmo.com/framework/content-scripts-ui#config

Content scripts UI are a subset of content scripts.

Before I close this issue, want to confirm that if we have content files contents/calculate.ts and contents/calculate.tsx, Plasmo will only build contents/calculate.ts?

Thank you