Comments (10)
This should be fixed in parcel-bundler/parcel#8189, and since latest plasmo is using parcel 2.6.2 (which includes the fix), I think all you need to do is upgrade plasmo to latest version @deno-source
Also, for this case, you do not need to use the url
scheme - it's mainly used in source code. This should work (or at least it did on my machine xD)
"declarative_net_request": {
"rule_resources": [
{
"id": "ruleset_1",
"enabled": true,
"path": "~rulesets/test.json"
}
]
}
from plasmo.
Thanks for the report! We'll look into resolving this soon.
from plasmo.
Future note: we might want to add this to our documentation
from plasmo.
doc updated: https://docs.plasmo.com/workflows/faq#tilde-import-resolution
from plasmo.
This should be fixed in parcel-bundler/parcel#8189, and since latest plasmo is using parcel 2.6.2 (which includes the fix), I think all you need to do is upgrade plasmo to latest version @deno-source
Also, for this case, you do not need to use the
url
scheme - it's mainly used in source code. This should work (or at least it did on my machine xD)"declarative_net_request": { "rule_resources": [ { "id": "ruleset_1", "enabled": true, "path": "~rulesets/test.json" } ] }
That's great! That solved my puzzle! Thank you very much for your answer!
from plasmo.
doc updated: https://docs.plasmo.com/workflows/faq#tilde-import-resolution
I want to inject a script, using the ~ method does not seem to work, is there any other way, indexJS does not depend on any, this is a separate script
from plasmo.
@deno-source https://docs.plasmo.com/workflows/content-scripts#importing-web-accessible-resources (do this in a content script that wake up your background script with the path to the bundled index.js)
from plasmo.
I have tried this method but still get errors
from plasmo.
@deno-source https://docs.plasmo.com/workflows/content-scripts#importing-web-accessible-resources(在内容脚本中执行此操作,该脚本使用捆绑的 index.js 的路径唤醒您的后台脚本)
I use it in background-js
from plasmo.
@deno-source https://docs.plasmo.com/workflows/content-scripts#importing-web-accessible-resources (do this in a content script that wake up your background script with the path to the bundled index.js)
Also, I don't want this file to be packed and compressed.
from plasmo.
Related Issues (20)
- [BUG] Unable to Run Tests in with-jest Starter Repo
- [BUG] Tests Crashing Due to SyntaxError in @plasmohq/storage Package
- [BUG] example with-content-scripts-ui,where the CSUI container is lost after navigating within the SPA and upon returning. HOT 1
- [BUG] hot reload doesnt work when editing devtools.tsx HOT 1
- [BUG] Removing some MUI component in example causes 'Uncaught TypeError: defaultShouldForwardProp is not a function' error
- [BUG] Tab pages do not support hot reloading.
- [BUG] plasmo build --hoist HOT 2
- [EXP]
- [EXP] getInlineAnchorList() and custom getRootContainer() Example
- getStyle: PlasmoGetStyle api unable to get live-reload effect. HOT 2
- [BUG] The with-env example does not work
- [BUG] How to use tailwindcss style for suspended elements in custom components in contentui?
- [RFC] Manifest override by special target
- [BUG] tailwindcss doesn't work in content script UI HOT 4
- [RFC] Add Debugging Support
- [BUG] Service worker (background.ts) is not working HOT 2
- Why isn't there a packaging configuration file
- [BUG] I discovered tree shaking
- [BUG] "Cannot find module 'node:stream'" when use LuanRT / YouTube.js HOT 3
- Do I have to import in full tailwindcss antd daisyui in content.tsx
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plasmo.