🧩 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

MUI styles with PlasmoGetInlineAnchorList

Styles are added only for last shadow-root. Please tell me how to make it work. // Plasmo import createCache from "@emotion/cache";...

how do you get a privacy policy when uploading to chrome web store?

Most generators that I have searched for online require a link to your website to put in, but since my store isn't live yet, there is no link. How would I do this?

No styling for options.tsx

I have a basic options page written in TypeScript and styled via Tailwind CSS that displays perfectly within the popup. I saved all of the code to an OptionsPage.tsx, verified it displays fine, then used it in options.tsx: ```ts import React from 'react' import OptionsPage from '~pages/OptionsPage'...

Shadcn dosnt seem to work in content script ui

I have been trying to get Shadcn to work with CSUI. I followed almost everything from this server as well as the documentation, but it just doesn't seem to work. tailwind seems to work fine. am attaching some code can someone please help me out index.tsx ```tsx import cssText from "data-text:~/contents/style.css"...

support for multiple assets

trying to do a simple toggle icon extension (click extension to toggle icon) but it seems like only one icon ever included in build. is this possible?

Supabase url and anon key exposed

I am a newbie exploring Plasmo for supabase authentication. The public url and anon keys are added in the .env file. On building the file, I find the supabase url and anon keys are exposed in popup.js, which can be traced in Devtool sources. The bad actors may use the url and anonkey to exploit the auth.
What are the best ways to deal with supabase auth without exposing the url and key? Am I missing something?...

Firefox dev server manifest warnings

The ```json { "content_security_policy": { "extension_pages": "script-src 'self' http://localhost;object-src 'self';"...
No description

import url no longer working

Hey folks 👋🏻 just upgraded our extension at Attio to the latest version of Plasmo (0.85). It seems we can no longer include HTML into the bundle by doing: import doc from “url:test.html”. I’ve instead included the file as a web_accessible_resource, but the TS it imports can of course not be found as it’s no longer bundled. Is there an easy way to include this in the output?...

Parallel dev servers

I need to both run plasmo dev --verbose and plasmo dev --verbose --target=firefox-mv3, but when I run the latter I get ``` 🔵 INFO | Starting the extension development server... 🟡 1 | Starting dev server on localhost:52111, HMR on localhost:52112... 🟡 2 | Creating Manifest Factory......

How to sendToBackground from main world

i've try all of messaging method but background still not receive anything

button click inside CSUI closes the CSUI

When I click on a button inside the injected CSUI, the whole component is closing. I am using a useeffect with an event listener for mouseup event. However when I add the event listener to document.body instead of document, it works properly. But the problem is I can't add some event listeners to document body. Did anyone face this issue before?...

anyone got any good example of CSUI lifecycle?

I have been going through the official docs back and forth but still having tough time to fully grasp that concept. I managed to build something that adds a div to the page and then mounting the CSUI through it. But I feel like I am not using it properly. Anyone got any good examples of CSUI lifecycle?...

Rendering issue on single page application (SPA) like youtube

I am trying to make something for youtube where i am using inline anchor. I want to inject a button on every video on youtube homepage. My code is here ``` import cssText from "data-text:~contents/style.css" import type { PlasmoCSConfig, PlasmoGetInlineAnchorList } from "plasmo"...

useStorage makes extension window tiny.

every time i use the useStorage hook my windows resizes it's driving me crazy const [datas] = useStorage("auth_session") whenever i use this code my window becomes 1px by 1px...

Uncaught ReferenceError: Cannot access 'fromCurrentPageConfig' before initialization

Hi everyone! I've been building a Plasmo extension, and my dev build suddenly started breaking. The build actually finishes, but when I try to run the extension, I get: Uncaught ReferenceError: Cannot access 'fromCurrentPageConfig' before initialization fromCurrentPageConfig is an object I have in my code. Looking at the compiled popup.7d3dc21e.js file, I see this: ...

How to listen to a Port's disconnect event?

I created an entry file in background/ports/foo.ts, and I'd like to listen to onConnect/onDisconnect events (I want to know when the user has closed a certain tab). Is there a standard way to do this with plasmo?

Options and popup extension pages both working?

Hey, I got the Supabase options authentication, but I want after authentication also the popup to be working, how do I get the popup to work and the options page to work at the same time as currently its only one or the other. Thank you in advance....

Pin Side Panel like google search

I've been searching for a way to enable a direct button for my extension Side Panel. Accessing it each time through the side panel button and then selecting my extension is cumbersome. Has anyone found a solution or a way to trigger it with a keyboard shortcut?
No description

Adding Supabase later instead of starting with it?

Hey everyone, I started a Plasmo project initially --with-nextjs, now I want to use the Messaging API to communicate with my Supabase REST API, could I follow the docs of Supabase Plasmo afterwards or do I have to start with the --with-supabase to make this properly work? Best regards....
Solution:
you should be able to add it in later. The --with examples are just quickstarts to get you going

How can I listen to all requests?

I am trying to create an extension that will intercept all requests that were made on the webpage. How can I do this?