crxjs / chrome-extension-tools

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

[crx:manifest-post] The "path" argument must type string. Received an Array #629

Closed 404b closed 1 year ago

404b commented 1 year ago

Build tool

Vite

Where do you see the problem?

Describe the bug

When building for prod

Reproduction

pnpm run build

Logs

vite v4.0.4 building for production...
✓ 2 modules transformed.
[crx:manifest-post] The "path" argument must be of type string. Received an instance of Array
file: /crx-manifest
error during build:
TypeError [PLUGIN_ERROR]: The "path" argument must be of type string. Received an instance of Array
    at new NodeError (node:internal/errors:393:5)
    at validateString (node:internal/validators:163:11)
    at basename (node:path:1313:5)
    at Object.transform (file:///D:/extension/name/node_modules/.pnpm/@crxjs+vite-plugin@1.0.14_vite@4.0.4/node_modules/@crxjs/vite-plugin/dist/index.mjs:2891:21)
    at async transform (file:///D:/extension/name/node_modules/.pnpm/rollup@3.10.0/node_modules/rollup/dist/es/shared/rollup.js:22723:16)
    at async ModuleLoader.addModuleSource (file:///D:/extension/name/node_modules/.pnpm/rollup@3.10.0/node_modules/rollup/dist/es/shared/rollup.js:22929:30)
 ELIFECYCLE  Command failed with exit code 1.

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: Intel(R) Core(TM) i7
  Binaries:
    Node: 19.0.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.1.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0)

Severity

annoyance

jacksteamdev commented 1 year ago

Please provide a minimum reproduction. It's impossible to fix the issue if we don't know what you're doing. 🤷

jacksteamdev commented 1 year ago

I'm closing this issue b/c it doesn't have a minimum reproduction. Please feel free to open a new issue with a minimum reproduction.