🧩 Plasmo Developers

PD

🧩 Plasmo Developers

Join the community to ask questions about 🧩 Plasmo Developers and get answers from other members.

Join

👾extension

👟framework

🔰newbie

🦉pallas

Issue with object incjection to global window object

I'm facing an issue in dev mode, which is kind of pain in the neck as I'm developing a crypto-wallet, that I want to be able to connect with the Dapp (decentalized application). So in order to do it I need an RPC-like communication between my extension and the app, which was adviced to me to use the content.ts as the solution, because And now by folllowing the instructions in the docs https://docs.plasmo.com/framework/content-scripts. When I type in the window.hackerWallet then it returns undefined. For some more details of the env and what I did to solve it:...

Include source maps when using --zip

Dear Plasmo developers, I think the --source-maps flag doesn't work with --zip. I am new to the project, so I started by opening a PR that should fix it: https://github.com/PlasmoHQ/plasmo/pull/1318 Do I need to post that somewhere so someone can take a look at it? We built an internal extension, and source maps would be nice in our production bundle to troubleshoot issues on the fly 🙂...

Change daisyui theme

Is there any way to change the daisyui theme from default "light" to another one? Tried some stuff but had no success

Toggle content.tsx visiblity with the pinned extension icon

I want to be able to toggle the visibility of my content.tsx with the pinned extension icon in my chrome browser, Just like the way attio does it.
Solution:
I was able to fix it... I'll drop a link to my repo https://github.com/oluwadaprof/dune...
No description

ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @plasmohq/parcel-core@0.1.11

I'm trying to scaffold out a new Plasma project with pnpm but I keep getting this error on installation: ```  ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @plasmohq/parcel-core@0.1.11 ...

Failed to dynamically inject content script using activeTab

I want to inject content script using activeTab permissions through my background script. When I am referring the file like this import contentFile from "url:./lib/content.tsx" and executing it like this ``` ...
No description

Wondering about static analysis on content script output and AST usage in Plasmo

Hi, hope you're all well I use Plasmo at my workplace where we have heaps of content scripts with unique config objects returned (often with different matches arrays). To make the code more readable and easy to understand I was going to introduce some changes to dynamically populate the URL matches list with common URLs that are used for each extension. Recently I discovered that Plasmo statically analyses these files, causing errors when trying to dynamically populate the configuration. ...

plasmo dev --target=firefox-mv3 tryies to connect to "wss" instead of "ws" and errors out

Included is a screenshot of building for firefox-mv3, and installed a temporary addon in firefox. In there, it tries to connect to wss://localhost:1815 and then wss://localhost:1816, fails both, then tries http://localhost:1815, and fails again Big problem here is, on firefox, it then reloads the exension, some memory leaks seem to happen, then it all begins again. Whereas, the second image is what it looks like, correctly, for firefox-mv2....
No description

Override default newtab url

Hello guys, I am currently building a chrome extension that loads when a new tab is opened. I'm building it in the "newtab.tsx" as specified in the documentation. When it's lauched, its url is "chrome-extension://<extension-id>/newtab.html". I'm wondering if it's possible to override this default url to be something like "chrome-extension://<extension-id>/<app-name>.html"? Many thanks in advance for any help!...

Connecting to Metamask (or any wallet extension) in my content script UI

Hi, I'll like to connect to installed wallet in my extension's CSUI, I've tried all I know, nothing seems to work. anyone have an idea how i can achive this or an exmple I can learn from?

How to Inject script

How to inject scripts in to browser like metamask and phantom wallets

Debugging plasmo source code

Hi! Any guidelines/steps to follow to be able to successfully debug plasmo source code (also being able to use breakpoints?). Does a custom launch.json exist?CONTRIBUTING.md mentions using "pnpm dev:cli" but that's it. Thought I may ask, maybe I am missing something

Error while setting plasmo on a fedora desktop.

I'm using fedora 41 and Node 22 (lts) and I'm creating my plasmo project using (npm create plasmo). But it gives me error everytime. What's the solution to this ? #👟framework...

Blacklisting

I have a widget that injects into every page. Is there a way to blacklist specific domains? On some sites it messes up styles and if I just return empty component if domain matches it still messes up the styles.

Bug in the with-messaging example

Ran into the same issue: https://github.com/PlasmoHQ/plasmo/issues/838 Also pointed out a request to improve the documentation in: https://github.com/PlasmoHQ/plasmo/issues/801 How is the messaging supposed to work in the with-messaging example? If there's documentation on how each peace of the demo works, it'll be extremely helpful....

Google Analytics Issue (URL import)

Hello, Im facing a weird bug when trying to use google analytics, in my content.tsx im importing the google tag manager import "https://www.googletagmanager.com/gtag/js?id=G-..... in the dev build it works fine and I see requests to /collects and in the analytics dashboard I see the data, but in the production build it's not working and not able to import the gtag Uncaught (in promise) Error: Cannot find module 'iKwBb Uncaught TypeError: Cannot read properties of undefined (reading 'register')...
No description

Pass data from Content.ts to Options Page via Storage API

Unable to pass user data from content.ts to the options page using Storage API. Data is being set but returns undefined when accessed. Current Behavior - Data is collected from website in content.ts - Attempting to store data using Chrome Storage API...
No description

Hi there,

I've been using Plasmo for sometime and everything is working correctly but now I'm having a CSP problem: Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present. ...

Fresh install with errors

After installing Plasmo and manually adding tailwind I'm getting this error. I've ran audit fix multiple times, but this resulted in bricking the entire installation. Even when removing everything (node_modules, .plasmo and package_lock.json) and resetting the package.json back to it's original state. Not sure what is going on, but something is wrong....
No description
Next