🧩 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

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

Importing Tailwind CSS stylesheets for every content script UI component: how bad for performance?

So, I've really been struggling getting Tailwind to play nicely with Plasmo, and specifically content script UI components (CSUI). My components are being overlaid into the hosting webpage which means I don't have the ability to just import one stylesheet at a "root" level (or maybe I can? I dunno) and instead have many of my own components inserted into the UI within a shadow root element. Unfortunately, since I don't have a normal root for all my components that means that I need to import the styles for each component individually, and since I'm using Tailwind that seems to mean that I have to import the globals.css file for Tailwind (which also imports other stylesheets into itself) for each component.The overall size of this import is not negligible and since my components append themselves to posts on a social media feed I'm also concerned that the issue could be exacerbated. My question is: how much of an issue is this for performance? I am mostly concerned about each component having a <style> element containing kilobytes of CSS rules. At what point does this become a performance issue? Does each component's stylesheet need to be parsed or is there opportunity for caching? Does the extra size of the DOM also make lookups, etc more costly, etc? Would love some feedback. Thank you!...
No description

Is there a way to hook into the plasmo dev build?

I would like to run something every time the extension rebuilds in development. (This would be before it builds, not after). Something like Parcel macros would be ideal but this is only available in Parcel 2.12.x. Any chance we can bump parcel-core in the next release? Is there another way? Is there a concept of Plasmo plugins (for dev)?...
Next