🧩 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

Possibility to customize path aliases?

I want to have all my extension related pages in one directory (e.g. /app). Is it possible? I tried the solution below, but it's not working: tsconfig.json...

Publishing to Multiple Markets using @PlasmoHQ/bpp github action

Hello everyone! Hope you're doing well! I'm having a bit of trouble on how to publish my extension to multiple markets. I currently only publish it to Chrome Webstore, but want to enable it for Firefox and eventually Edge. I use the @PlasmoHQ/bpp, which states:...

Build Failure | (reading 'message') | AssistantUI | React

I'm using assistant UI in my React Plasmo application, resulting into following error.
No description

Turborepo with Svelte and shadcn-svelte as a package

Hi! I'm trying to set up a monorepo using Turborepo with Plasmo using Svelte and shadcn-svelte as a package. However, when I tried importing a component that's exported by the ui package, I'm getting the following error. Does anyone know how to fix this?...
No description

Remove "getInlineAnchor" zIndex style

Is it possible to remove the style z-index: 2147483647; from the plasmo-shadow-container div? Currently, my content is stick to the page, I don't want it to have z-index style. Thanks in advance....

Cannot resolve bits-ui when using Svelte with shadcn-svelte

I'm using Svelte and have been trying to use it with shadcn-svelte. Some of the components work fine, but when I tried to use the ScrollArea which uses bits-ui, I'm getting the following error: Failed to resolve 'bits-ui' from './src/components/ui/scroll-area/scroll-area-scrollbar.svelte' Has anyone encountered this before or knows how to solve this? Thanks!...

useState is not working

https://discord.com/channels/946290204443025438/1282889494596550717 I have posted a question regarding useState not functioning properly. Has any of you faced the same problem before?...

how to use Svelte reactivity on CS?

Maybe I'm too dumb, but what's wrong? Wasn't that supported? ```js <script context="module" lang="ts"> import cssText from "data-text:~/style.css"; import type { PlasmoCSConfig, PlasmoGetInlineAnchor, PlasmoMountShadowHost } from "plasmo";...

CLI: `plasmo dev` is freezing & unresponsive

Hey @lab 👋, Just opened this GH issue: https://github.com/PlasmoHQ/plasmo/issues/1062 Any idea how I can get more verbose logs to debug my issue?...

Anyone facing issue while installing shadcn?

I get an error that says "couldn't find the framework" when I try to initialize shadcn and create components.json file?

getInlineAnchor being invoked repeatedly, even after CSUI is rendered

is it normal for getInlineAnchor to be invoked repeatedly by the Plasmo framework, even after the anchor is found to exist and the CSUI renders? I have a very basic extension, where I just want to add a button next to the <body> element of the page. I have the following snippet ``` export const getInlineAnchor: PlasmoGetInlineAnchor = async () => {...

Environment vars with manifest override arrays

I have an array of urls in the host permission section of my manifest override in my package.json: ``` "host_permissions": [ "http://localhost/*",...

HMR becoming less and less reliable as project size grows

Originally the HMR worked very well however as my project has grown in size (over 100 files) it has become less reliable. According to the dev server it is repackaging the extension when I save. However when I then reload the page for the content script those changes are not there. Instead I have to restart the dev server to see the new changes.

Default port and `--serve-port`

Hey framework team. Your docs indicate that the default port is 1012, but my dev server appears to be using 1816 or 6XXXX. The second port changes each time I run the dev server, so I see 63858, 63890, 64191. When I run my Plasmo dev server and then do sudo lsof -i -P | grep LISTEN | grep :$PORT those two ports, plus the expected 1815 for HMR, are the only new ports listed. Secondarily, when I add plasmo dev --serve-host=localhost --serve-port-1012 to my package.json scripts (or another port like 8080) appears to have no effect. I still see 1815, 1816 and 6XXXX. For example, I have "dev": "plasmo dev --serve-host=localhost --serve-port-1012", in my package.json and just ran pnpm dev and the ports are 1815m 1816 and 64191...

different WINDOW variables

I have a script that creates an object that I need to use inside the window variable. I insert this script like this: ```js const script = document.createElement('script') script.type = 'text/javascript'...

Overriding the default renderer

I'm trying to override the default renderer so I can use a custom mutation observer (clicking on next page on the SPA does a scroll to top so I want to wait for it to finish to stop 10 components all requesting data at once). When using an inline anchor, I can see the anchor appearing with a type of inline, but the createContainer seems to throw an exception with: TypeError: Cannot read properties of undefined (reading 'type'). When using an inline anchor list I can't see anything being logged to the console. ...

Messaging Port API BGSW->sidepanel

Hello! I am having a hard time understanding if Plasmo currently supports the Mesaging API for sending a message from the BGSW to a content script (or in my case, a sidepanel). The docs summary seems to say it exists, but then it doesn't look like the documentation is there yet. Also, the design of the port event handlers has a (req, res) as if it is just immediately responding to messages instead of keeping a connection. In order to send a message from the background, I need to have a reference...

Css bundling - Css modules + classnames breaks

Hi! I am quite far in the process of migrating my extension to plasmo framework. I managed to make most of the things work except the following: I use css modules (with sass) and the classnames package to append multiple classes. In most of my react components I receive as prop the className which should also apply to the component(a quite common pattern) like this:...
No description

Remix production cannot sendToBackgroundViaRelay

I use a SAAS of remix at https://github.com/dev-xo/remix-saas/tree/main/docs and intergrate with plasmo extension with sendToBackgroundViaRelay so that i can proxy my apis call from web to extension ```tsx // on index.tsx export default function DashboardIndex() { const { t } = useTranslation()...