🧩 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

language switching not work in plasmo

"I set up languages folder with locales/en/messages.json & locales/fa/messages.json, but need help with making a language switcher. How can users change between English and farsi in my extension?" i want user can able to handle this switch between langs

Implementing Auth in Content Script UI with Plasmo ?

Can I implement authentication in a content script UI using Supabase or Clerk with the Plasmo framework? Are there any best practices or limitations I should consider?

How do I generate a chrome-specific manifest with a single code?

Hi, I make a browser extension by Plasmo and published it for Chrome, Edge and FireFox. I have created a Chrome-only feature that uses Oauth2 and web api to access Google data. This is working fine, but only the manifest.json generation is not working. When I create a key and oauth2 item for chrome in the manifest item of package.json, it is also included in the build for firefox....

Trusted Typed Policy error just in Linkedin!

Hey guys. I wrote an extention and everything works good even at Linkedin but I always get this error in the console and it causes error in the extention: Refused to create a TrustedTypePolicy named 'goog#html' because it violates the following Content Security Policy directive: "trusted-types 'allow-duplicates' default jSecure highcharts dompurify". ...

[object DOMException]

Idk what this error means after hours of researching. When I open the manage extentions i have error btn on my extention and i have this error. It highlights get hasWebApi (){ try{...

Inject content script manually

Hey, how to tell PlasmoCSConfig to not create entry in manifest, since I inject content script manually and only on activeTab?

SecureStorage with session area name

I am using SecureStorage to store my crypto extension secret. Like this: export const sessionSecureStorage = new SecureStorage({ area: "session", })...

Side panel and CSUI interactions

I'm trying to trigger open/close the side panel from content script UI where I have a button rendered on top of the webpage. Clicking on it means to toggle the side panel. I tried calling chrome.sidePanel.open() from my content script but it didn't work. Then I tried to do it via sending it to background script and calling chrome.sidePanel.open() from there - didn't work as well. I assume there was some misconfiguration or an error that I overlooked? It was throwing an error:
Failed to open side panel: Error: `sidePanel.open()` may only be called in response to a user gesture.
Failed to open side panel: Error: `sidePanel.open()` may only be called in response to a user gesture.
...

error GET chrome-extension://invalid/ net::ERR_FAILED

Hi all, I built an extension for LinkedIn using Plasmo. My manifest looks like so: ```"manifest": {...

Uncaught (in promise) Error: QUOTA_BYTES_PER_ITEM quota exceeded

Hi all, I am trying to allow users to be able to upload their own HTML templates, but I am repeatedly getting this error. Troubleshooting done:...

Svelte imports not working

Not even really sure whats going wrong Ive spent hours on this issue. For some reason when importing either ui elements or libraries with svelte no matter what I do its giving me issues. Examples would be: Cannot load file './index' from module 'bits-ui' Failed to resolve '$lib/components/ui/card' from './src/contents/FloatingPanel.svelte' Failed to resolve 'bits-ui' from './src/lib/components/ui/button/button.svelte' ...

Uncaught ReferenceError: Cannot access 'yC' before initialization

Having problems importing a third party library with Plasmo. I'm using CSUI with React. The element I'm working on is a single anchor Everything seemingly smooth on VSCode and terminal but when I go to inspect the page the titular problem pops up yC is the bundled name for PrivyProvider, the component that wraps the element...

Nested Background Messages?

I am trying to group background messages in nested folders under background/messages/{nested}. I noticed that if I put a regular background script in there, it will work, but if I put a PlasmoMessaging handler in a nested folder, it won't register. Is there a way to get the Plasmo Messaging API to look into nested folders so I can organize my messengers properly?

Cross-Browser Messaging Code

I just read through the docs on the Plasmo Messaging API and it's not clear if these APIs work across all browsers or if there are limitations, such as on Firefox and perhaps Safari. Ideally we would have an abstraction for messaging that works for all browser types so that we don't have to write browser-specific messaging alternatives....

Extremely long build times (~1 hour per compile)

Hi all, I am looking to get assistance with my extension. When running pnpm dev --verbose , I am getting to the following message: 🔵 INFO | Loaded environment variables from: []...

Plasmo rerendering CSUI infinitely and using up PC memory

I have the code below that uses and anchorlist to inject multiple instances of the same component. Anchorlist is supported by plasmo but for some reason it runs in an infinite rerender loop: ```import React, { useEffect, useRef, type FC } from 'react'; // import './components/SearchResults/SearchResults.scss';...

Uncaught Error: Cannot find module '@plasmohq/storage' (works in prod not dev)

I can't use plasmo storage with a prod build but it works on dev. I'm super confused.

Vite?

Is there any chance to use Plasmo with Vite?

Anyone got react-markdown work with Plasmo?

I am having issues with using react-markdown in Plasmo. Anyone got this working?

AI stream to content script

I am creating a chrome extension which is a content script, I want to stream my AI response and display it token by token. I am able to get the stream with POST request using background script but don't know how to get it to content script token by token by using res.send() or something similar....
Next