McMatt
McMatt
PD🧩 Plasmo Developers
Created by McMatt on 1/30/2024 in #👾extension
How to include JSON file referenced in manifest (Failed to resolve file.json)
I'm trying to setup "declarative_net_request" in the manifest. However whenever i include the resource "blocklist.json" I get the "failed to resolve" error. Here's my package.json:
{
"name": "test",
"displayName": "Test",
"version": "0.0.1",
"description": "A basic Plasmo extension.",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"test": "plasmo test"
},
"dependencies": {
// commented out
},
"devDependencies": {
// commented out
},
"manifest": {
"host_permissions": [
"https://*/*"
],
"permissions": [
"storage",
"tabs",
"scripting",
"webRequest",
"declarativeNetRequest",
"<all_urls>"
],
"declarative_net_request": {
"rule_resources": [
{
"id": "1",
"enabled": true,
"path": "./blocklist.json"
}
]
}
}
}
{
"name": "test",
"displayName": "Test",
"version": "0.0.1",
"description": "A basic Plasmo extension.",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"test": "plasmo test"
},
"dependencies": {
// commented out
},
"devDependencies": {
// commented out
},
"manifest": {
"host_permissions": [
"https://*/*"
],
"permissions": [
"storage",
"tabs",
"scripting",
"webRequest",
"declarativeNetRequest",
"<all_urls>"
],
"declarative_net_request": {
"rule_resources": [
{
"id": "1",
"enabled": true,
"path": "./blocklist.json"
}
]
}
}
}
Here's a basic repersentation of my directory: Project/ ├─ package.json ├─ blocklist.json ├─ build/ ├─ .plasmo/
3 replies