Build tool
Vite
Where do you see the problem?
Describe the bug
The entry chunk of a content script doesn't need to be in web_accessible_resources, since it is loaded by the browser. This unnecessarily exposes the content script to the page.
Reproduction
- Run
npx create-crxjs@latest -t vanilla crxjs-test
cd crxjs-test
npm install
npm run build
- Check
dist/manifest.json
{
...
"content_scripts": [
{
"js": [
"assets/main.js-DSyJgt1-.js"
],
"matches": [
"https://*/*"
]
}
],
...
"web_accessible_resources": [
{
"matches": [
"https://*/*"
],
"resources": [
"assets/main.js-DSyJgt1-.js"
],
"use_dynamic_url": false
}
]
}
Logs
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 AMD Ryzen 7 9700X 8-Core Processor
Memory: 34.37 GB / 61.60 GB
Binaries:
Node: 24.14.0 - C:\Program Files\nodejs\node.EXE
npm: 11.4.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 145.0.7632.119
Edge: Chromium (145.0.3800.70)
Firefox: 148.0 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.22621.3527
npmPackages:
@crxjs/vite-plugin: ^2.0.3 => 2.3.0
vite: ^7.0.5 => 7.3.1
Severity
annoyance
Build tool
Vite
Where do you see the problem?
Describe the bug
The entry chunk of a content script doesn't need to be in
web_accessible_resources, since it is loaded by the browser. This unnecessarily exposes the content script to the page.Reproduction
npx create-crxjs@latest -t vanilla crxjs-test cd crxjs-test npm install npm run builddist/manifest.json{ ... "content_scripts": [ { "js": [ "assets/main.js-DSyJgt1-.js" ], "matches": [ "https://*/*" ] } ], ... "web_accessible_resources": [ { "matches": [ "https://*/*" ], "resources": [ "assets/main.js-DSyJgt1-.js" ], "use_dynamic_url": false } ] }Logs
System Info
System: OS: Windows 11 10.0.22631 CPU: (16) x64 AMD Ryzen 7 9700X 8-Core Processor Memory: 34.37 GB / 61.60 GB Binaries: Node: 24.14.0 - C:\Program Files\nodejs\node.EXE npm: 11.4.1 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 145.0.7632.119 Edge: Chromium (145.0.3800.70) Firefox: 148.0 - C:\Program Files\Mozilla Firefox\firefox.exe Internet Explorer: 11.0.22621.3527 npmPackages: @crxjs/vite-plugin: ^2.0.3 => 2.3.0 vite: ^7.0.5 => 7.3.1Severity
annoyance