FlandreDaisuki / rollup-plugin-userscript-metablock

Transform json file to userscript metablock and append on.
https://www.npmjs.com/package/rollup-plugin-userscript-metablock
MIT License
35 stars 7 forks source link

Warning when packaging `match's metavalue should be a valid match pattern string` #14

Closed rxliuli closed 4 years ago

rxliuli commented 4 years ago

metablock.json

{
  "match": [
    "https://app.slack.com/client/*",
    "http://127.0.0.1:*/*",
    "https://userjs.rxliuli.com/*"
  ]
}

image

FlandreDaisuki commented 4 years ago

The match pattern is defined in Chrome extension dev & MDN.

There is no description to host:port in Chrome, but MDN explicitly says it is an invalid match pattern:

Note: The path pattern string should not include a port number. Adding a port, as in: "http://localhost:1234/" causes the match pattern to be ignored. However, "http://localhost:1234" will match with "http://localhost/"

To reduce the warning, I suggest you using include instead of match to http://127.0.0.1:*/* pattern.

FlandreDaisuki commented 4 years ago

If you have more questions, we can reopen it.