🧩 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

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....

2 problems : import component & send messaging

Good morning, I have 2 problems. The first: I need to have child components in the content script. Now if I create the child in the contents folder and import it in the classic Vue way, then I find this component on its own in the injection page and not as a child of my script (img 1 & 2 ) . however, if I insert the child into another folder, it is not displayed on the page at all (img 3) ...
No description

Maximum size for extension bundle/archive you can upload in Google Chrome Store?

I've looked in the Google docs and in the developer portal, but can't find a single place which states what's the maximum size of an extension bundle/archive. Any clues?

Can I use native web components with CSUI?

I tried using Content Scripts UI (CSUI) with a native web component instead of a react component (see below), but I got a bunch of React errors in the browser console referring to a React component. Is there a way to make Plasmo work with native web components or something like Lit? Thanks. ```import type { PlasmoCSConfig, PlasmoGetInlineAnchor } from "plasmo" export const config: PlasmoCSConfig = {...
Next