aklinker1 / vite-plugin-web-extension

Vite plugin for developing Chrome/Web Extensions
https://vite-plugin-web-extension.aklinker1.io/
MIT License
553 stars 48 forks source link

Error: You must supply options.input to rollup #62

Closed Cihatata closed 1 year ago

Cihatata commented 1 year ago

Hi,

I am using vite-plugin-web-extension v1. Firstly i removed this line"default_popup": "popup.html from manifest.json then i run build command and Vite threw error. Error: You must supply options.input to rollup

if i add popup.html again to manifest.json. There is no problem.

i dont want to use popup. How to remove it ?

how do i fix this problem ?

Error log

image

My manifest

{
  "manifest_version": 3,
  "name": "Resmo Chrome Extension",
  "$schema": "https://json.schemastore.org/chrome-manifest.json",
  "description": "",
  "version": "1.0",
  "background": {
    "service_worker": "only_background.js"
  },
  "icons": {
    "16": "public/images/icon-16.png",
    "32": "public/images/icon-32.png",
    "48": "public/images/icon-48.png",
    "128": "public/images/icon-128.png"
  },
  "action": {
    "default_icon": {
      "16": "public/images/icon-16.png",
      "32": "public/images/icon-32.png"
    },
    "default_title": "Click to view a popup"
  },
  "permissions": [
    "alarms",
    "identity",
    "identity.email",
    "scripting",
    "storage",
    "tabs",
    "webRequest",
    "declarativeNetRequest",
    "declarativeWebRequest",
    "*://*/*"
  ],
  "host_permissions": [
    "http://*/*",
    "https://*/*"
  ],
  "content_scripts": [
    {
      "matches": [
        "http://*/*",
        "https://*/*"
      ],
      "js": [
        "contentScript.js"
      ]
    }
  ],
  "content_security_policy": {
    "extension_pages": "script-src 'self'; object-src 'self'"
  }
}
aklinker1 commented 1 year ago

See #10 and #40. V2 will support extensions without a UI, but right now you need at least 1 html file.

Here's a work around for now: https://github.com/aklinker1/vite-plugin-web-extension/issues/10#issuecomment-1089367768

Cihatata commented 1 year ago

Okey, thank you. I'm looking forward to the new version.