crxjs / chrome-extension-tools

Bundling Chrome Extensions can be pretty complex. It doesn't have to be.
https://crxjs.dev/vite-plugin
2.82k stars 188 forks source link

sidepanel.html not in dist folder #839

Open DennisOosterling opened 10 months ago

DennisOosterling commented 10 months ago

Build tool

Vite

Where do you see the problem?

Describe the bug

The issue is the same as in https://github.com/crxjs/chrome-extension-tools/issues/729. the sidepanel.html in the root folder is not copied into the dist folder.

The solution of using the extra build option in the defineconfig also doesn't change this.

export default defineConfig({
  plugins: [react(), crx({ manifest })],
  build: {
    rollupOptions: {
      input: {
        sidepanel: "sidepanel.html",
      },
    },
  },
});

Reproduction

just a regular crxjs project with a sidepanel.html and

  "side_panel": {
    "default_path": "sidepanel.html"
  },
  "permissions": [
    "sidePanel"
  ],

inside the manifest.

Logs

No response

System Info

System:
    OS: Linux Ubuntu 22.04 LTS
    CPU: 11th Gen i5
    Memory: 15.32 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
  npmPackages:
    @crxjs/vite-plugin: ^1.0.14 => 1.0.14 
    vite: ^2.9.15 => 2.9.16

Severity

annoyance

nandanito commented 9 months ago

This issue has been taken care of in commit #717 . If you use the pre-release 2.0.0-beta.21 instead, then sidepanel.html is copied to the dist folder.

chengfengfengwang commented 4 months ago

Why this important feature still in beta version...