PlasmoHQ / plasmo

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

[BUG] Icon not working for devtools panel #1044

Open maybebansky opened 1 month ago

maybebansky commented 1 month ago

What happened?

I'm creating a devtools panel. This is working however when I try to add an icon it doesn't show up.

I need the icon to be next to the panel name as it is for "Components" and "Profiler" here:

Screenshot 2024-08-05 at 14 10 01

This is my devtools.tsx. Commented out are the different paths that Ive tried (Ive tried having the icon within the assets folder and also in the project root):

import projectHtml from "url:./panels/project/index.html"

// import panelIcon from "url:~/assets/icon16.png"
// import panelIcon from "./icon32.png"
// import panelIcon from "url:./assets/icon16.png"
// import panelIcon from "./assets/icon16.png"
// import panelIcon from "icon16.png"
import panelIcon from "./assets/icon32.png"

chrome.devtools.panels.create(
  "Test Project",
  panelIcon,
  // See: https://github.com/PlasmoHQ/plasmo/issues/106#issuecomment-1188539625
  projectHtml.split("/").pop()
)

function IndexDevtools() {
  return (
    <div>
    </div>
  )
}

export default IndexDevtools

I'm not seeing any errors in the terminal when I build the extension so unsure how to debug this.

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct