🧩 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

Is there anyway to get the plasmo dev server working in a docker container? pnpm dev works on host

The server is all up and running using node:18-bullseye. However when i load unpacked into chrome it says that it cannot connect with the websockets running on ws://localhost:1815 and ws://localhost:1816. ``` function A(e) { if (typeof globalThis.WebSocket > "u") return;...

No supported UI library found.

``` pnpx plasmo init --with-svelte example cd example pnpm up -L '*' pnpm run dev...

SWC not resolving

Realized I should have probably put this here. I had been using CRXjs, but recent chrome updates have made that extension framework unusable. Working on learning plasmo so I can convert my project to it. Trying to setup a basic options page example following the with-options example. When I run plasmo dev, I get the following:...

How to Dynamically Mount/Unmount Plasmo Components without Page Refresh?

Problem: In a SPA app, components matched to specific URLs don’t consistently mount/unmount on soft navigations (client-side routing). Components either appear only after a page refresh or fail to unmount without one. The goal is to achieve dynamic mounting and unmounting of components in response to soft navigations without loading content scripts on all pages, especially in large extensions with numerous features. Question:...

What is 'plasmo-mount-container'?

In the plasmo with svelte example here https://github.com/PlasmoHQ/examples/blob/main/with-svelte/contents/plasmo-overlay.css there's a #plasmo-mount-container target, but it's not clear to me what that is. I am not seeing this id anywhere in the codebase, and I am not seeing it in the rendered component either? I understand that the #plasmo-shadow-container is basically a secondary wrapper inside the shadowRoot, but I am not sure what the #plasmo-mount-container is. Maybe it's just some shorthand for targeting the framework's (svelte) own top-level element / mountpoint to plasmo, but I am not sure. You don't see this in the react example here: https://github.com/PlasmoHQ/examples/blob/main/with-content-scripts-ui/contents/plasmo-overlay.css Instead here, the .hw-top class is targetted directly. Any clues?...

sendToBackground in MAIN world doesn't work even with extensionId provided

Hello, thanks for the great framework! I've almost got my MVP done but have run into a brick wall with content scripts. Following the example on https://docs.plasmo.com/framework/messaging#message-flow, this snippet is what i'm after:
To send a message from a content script thats in the main world you'll have to include your extension's id in the request. Your extension's id can be found in chrome's extension manager window once you've built and added it to your browser....

Requesting microphone permissions

Is there an easy way to request and use microphone permissions for a chrome extension? Everywhere I've looked has given workarounds that I can't seem to successfully implement. Thanks!...

Pass custom props to CSUI component

Hello, Because I am generating multiple plasmo-csui within getInlineAnchorList and fetching data in it, I would like to cache that data and maybe pass it as props to the react csui component. The data will be fetched asynchronously...

Using getInlineAnchorList but having plasmocsui into a child

Hey, I am trying to do a web extension for a website which contains that structure ```...

Custom MutationObserver

Hello, Thank you for this great framework! I am trying to have a custom MutationObserver, however the doc mentionned it without giving an example, can someone explains how to do it please?...

How to send messages from content to content?

I am building an extension which injects multiple content script UIs in a single page (in order to have different mount points) and I am looking for a way to get them to pass messages efficiently. I managed to do it via the messaging API, but that takes 5ms on average and isn't exactly snappy. Apparently the chrome.tabs API isn't available to content scripts for some reason, and as far as I can tell you can't use the chrome.runtime API to send directly between content scripts because although th...

Create child components for ContentScript

I'm trying to create child components for the main component in Contents, if I create the component directly in the Components folder it is seen as a separate element and is imported randomly into the DOM, while if I put it in a Contents/Components folder it isn't imported at all from the parent component. Do you have solutions?

Cannot get Chakra-UI to render on Content

Hi I was trying to make a sidepanel overlay using plasmo to track my leetcode progress against a weekly goals, and want to use Chakra-UI's progress bar. However, I cannot get the component to render on the side panel. I've provided the code and screenshots below. Content.tsx: ```import { ChakraProvider } from "@chakra-ui/react" import cssText from "data-text:~style.css" import type { PlasmoCSConfig } from "plasmo" import { CountButton } from "~features/count-button"...
No description

Create new project with vue

Hello, i can't understand how create a plasmo project with vue3 and with content script (also them with vue), how is it the cli ? TY

Extension Works on DEV MODE but not in PRODUCTION MODE, Why???

Hi, I'm encountering an issue with image uploads to Facebook Marketplace in my Chrome extension. Here's a brief overview of the problem: ...

Plasmo within Nx monorepo

Hello everyone, I'm trying to create an extension app inside my nx monorepo using to share React components, and is wondering if anyone had had a success to setup the configuration and is willing to share a bit of your insights? Specifically on tsconfig and how to build the overwrite manifest inside package.json Thanks!!

posthog identification

I’m working on a Next.js 14 project, where I’m using an API to retrieve user details (with the logic inside background/ports/file.ts). The login redirects users to our product’s URL, and we’re checking authentication via JWT. Where would be the best place to call posthog.identify()?

Having a hard time integrating shad-cn with plasmo

I"'m using all the default config but for some, the text doesn't get the right CSS property. Any idea why that is? I would appreciate the help, at this point, I'm so confused I have no clue what's working or not. There seems to be some CSS property that gets overridden and the same behavior isn't replicable on a non-plasma-based project. So what's going on here really? I will have to manually add color classes to text which would be too painful to maintain. Here's the gist with all the config https://gist.github.com/purplecandy/57e603260aba0f3b4fd780b469aca6e9...
No description

Publishing Private (Unlisted) Extensions

In the past, I have built a browser extension for my team. I'm looking to start using Plasmo to publish an extension, rather than continuing the trend of "Load Unpacked." However, I will need to publish it as private or unlisted so that only my team members may have access. Does Plasmo have the ability to publish unlisted extensions via the Browser Platform Publisher (BPP) Github Action?
Next