Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filenames.map is not a function #53

Open
talentlessguy opened this issue Apr 21, 2020 · 1 comment
Open

filenames.map is not a function #53

talentlessguy opened this issue Apr 21, 2020 · 1 comment

Comments

@talentlessguy
Copy link

When putting

 "content_scripts": [
    {
      "matches": ["*"],
      "js": "content_url.ts"
    }
  ]

inside a manifest.json I get this error:

➜ yarn dev
yarn run v1.21.1
$ parcel -p 3000 --hmr-port 35887 manifest.json
Server running at http://localhost:3000 
🚨  /home/v1rtl/Coding/ext-tracking/manifest.
json: filenames.map is not a function
    at ManifestAsset.processMultipleDependencies (/home/v1rtl/Coding/ext-tracking/node_modules/.pnpm/registry.npmjs.org/parcel-plugin-web-extension/1.6.1/node_modules/parcel-plugin-web-extension/src/ManifestAsset.js:125:26)
    at ManifestAsset.processContentScripts (/home/v1rtl/Coding/ext-tracking/node_modules/.pnpm/registry.npmjs.org/parcel-plugin-web-extension/1.6.1/node_modules/parcel-plugin-web-extension/src/ManifestAsset.js:168:34)

here's my package.json:

{
  "name": "ext-tracking",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "parcel -p 3000 --hmr-port 35887 manifest.json"
  },
  "keywords": [],
  "author": "v1rtl",
  "license": "ISC",
  "browserslist": [
    "last 1 Chrome versions"
  ],
  "devDependencies": {
    "@types/chrome": "^0.0.104",
    "parcel-bundler": "^1.12.4",
    "parcel-plugin-web-extension": "^1.6.1",
    "typescript": "^3.8.3"
  },
  "dependencies": {
    "htm": "^3.0.4",
    "preact": "^10.4.0"
  }
}
@emschwartz
Copy link

The js field should be an array of files rather than the single string content_url.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants