extension-js / extension.js

🧩 The cross-browser extension framework.
https://extension.js.org
MIT License
3.72k stars 93 forks source link

Manifest `content_scripts` declaration adds extraneous `css` during build #213

Open wottpal opened 6 days ago

wottpal commented 6 days ago

Hey there, my extension was just rejected because it had a content_scripts.css field with a hallucinated file in there.

Input:

  "content_scripts": [
    {
      "matches": [
        "https://google.com/search*",
        "https://www.google.com/search*",
        "https://google.com/",
        "https://www.google.com/"
      ],
      "js": ["src/content/index.ts"]
    }
  ]

Output:

  "content_scripts": [
    {
      "matches": [
        "https://google.com/search*",
        "https://www.google.com/search*",
        "https://google.com/",
        "https://www.google.com/"
      ],
      "js": [
        "content_scripts/content-0.js"
      ],
      "css": [
        "content_scripts/content-0.css"
      ]
    }
  ],

Workaround:

jq '.content_scripts |= map_values(del(.css))' manifest.json > tmp.json && mv tmp.json manifest.json
cezaraugusto commented 4 days ago

got it, taking a look asap