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

npm run build generated an unnecessary .vite folder #894

Open chengfengfengwang opened 3 months ago

chengfengfengwang commented 3 months ago

Build tool

Vite

Where do you see the problem?

Describe the bug

npm run build generated an unnecessary .vite folder. It lead error in Edge Extension uploading.

Reproduction

npm run build

image

Logs

No response

System Info

System:
    OS: macOS 13.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 140.67 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.n/bin/node
    Yarn: 1.22.19 - ~/.n/bin/yarn
    npm: 10.5.0 - ~/.n/bin/npm
    pnpm: 9.1.1 - ~/.n/bin/pnpm
    Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 125.0.6422.142
    Safari: 16.5.2
  npmPackages:
    @crxjs/vite-plugin: ^2.0.0-beta.23 => 2.0.0-beta.23 
    vite: ^5.2.0 => 5.2.13

Severity

annoyance

udithishara commented 3 months ago

This is due to Manifest files are now generated in .vite directory by default

As a solution you can run a script to remove it after build or just exclude it from your pack script