Replies: 1 comment
-
@saxon1964 could you provide a repro for this? In your example you provided
this manifest with crxjs const manifest = defineManifest({
manifest_version: 3,
name: "some name",
version: "1.0.0",
content_scripts: [
{
js: ["./src/content.tsx"],
matches: ["<all_urls>"],
},
],
action: {
default_popup: "index.html",
},
web_accessible_resources: [
{
resources: ["assets/*", "css/*", "icons/*", "img/*"],
matches: ["<all_urls>"],
use_dynamic_url: false,
},
],
}); is giving me following output in {
"manifest_version": 3,
"name": "some name",
"version": "1.0.0",
"content_scripts": [
{
"js": [
"./src/content.tsx-loader.js"
],
"matches": [
"<all_urls>"
]
}
],
"action": {
"default_popup": "index.html"
},
"web_accessible_resources": [
{
"resources": [
"assets/*",
"css/*",
"icons/*",
"img/*"
],
"matches": [
"<all_urls>"
],
"use_dynamic_url": false
},
{
"use_dynamic_url": true,
"matches": [
"<all_urls>"
],
"resources": [
"**/*",
"*"
]
}
],
"background": {
"service_worker": "service-worker-loader.js",
"type": "module"
}
} package.json {
"name": "vite-4-without-swc",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@crxjs/vite-plugin": "^2.0.0-beta.12",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^3.1.0",
"typescript": "^4.9.3",
"vite": "^4.1.0"
}
}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To cut a long story short, here is a part of my manifest.js file:
web_accessible_resources: [ { resources: [ 'assets/*', 'css/*', 'icons/*', 'img/*' ], matches: ["<all_urls>"], use_dynamic_url: false }, ],
...and here is what
npm run build
generates from it:"web_accessible_resources": [ { "matches": [ "<all_urls>" ], "resources": [ "assets/*", "css/*", "icons/*", "img/*" ], "use_dynamic_url": false }, { "matches": [ "http://localhost:5173/*", "https://movies.luka.in.rs/*", "https://rmz.cr/*", "https://www.imdb.com/*", "https://www.imdb.com/*", "https://www.luka.in.rs/*" ], "resources": [ "assets/chunk-CW84PFo6.js", "assets/chunk-CLZG3LjF.js", "assets/chunk-C0qwE84I.js", "assets/chunk-C7XPqjKU.js" ], "use_dynamic_url": true } ],
So, my settings are preserved. But this extension adds its own part that basically duplicates (overwrites?) my simple settings. "Use dynamic url" is also changed from flase to true.
It's ok to generate a section of manifest if I don't supply my own section, but it's not OK just to ignore my settings if these are provided.
Beta Was this translation helpful? Give feedback.
All reactions