cypress-browser-extension-plugin
cypress-browser-extension-plugin copied to clipboard
Fix: use path.posix.join instead of path.join for manifest fields
Both, Chrome extensions and WebExtensions, use POSIX-style path names.
Currently, on Windows, loader.js' path.join generates invalid paths for background and content_scripts fields:
"background": {
"scripts": [
"scripts/background.js",
"cypress-extension-hooks\\background.js"
],
},
"content_scripts": [
{
"css": [
"styles/content-script.css"
],
"js": [
"scripts/content-script.js"
],
"exclude_matches": [
"*://*/*/integration/*"
]
},
{
"js": [
"cypress-extension-hooks\\contentscript.js"
],
}
],
References: https://developer.chrome.com/extensions/manifest/web_accessible_resources https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/web_accessible_resources