🧩 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

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

Hey, I just found out about your framework and trying to make extension that scrape currently viewed linkedin profile, but as soon as I added linkedin to basic plasmo example with changing background to pink I got over 1300 errors, any ideas how to fix it?
No description

How can I add global style into Tab & Popup with emotionjs?

Hi Plasmo Team and Community, I’m currently using Plasmo to develop a Chrome extension and trying to add global styles to a tab page using Emotion. However, I couldn’t find relevant examples or documentation to achieve this. I would appreciate your guidance....

Error with getting started tutorial

I'm new to the framework I just tried to create a new plasmo app using pnpm create plasmo, but every time I do this and cd into the directory to do a pnpm dev I get a malloc error: 🟣 Plasmo v0.89.4 🔴 The Browser Extension Framework 🔵 INFO | Starting the extension development server......

Svelte popup is not working from the with-svelte example

I have cloned the repo, installed using pnpm i and run dev server pnpm run dev. When I load the unpacked extension and click on it, doesnt open the popup. I also checked there is no popup html in the generated manifest in build directory, but it works with popup.tsx...
Solution:
It works now, the problem was with svelte config. ```js import preprocess from "svelte-preprocess" ...

Tree shaking

Hi all! I'm on the SDK team at clerk.com and adapting the SDKs to work with Plasmo and MV3. However, I'm running into an issue where the code doesn't appear to be appropriately tree-shaken. This is causing problems with extension approvals, as code that includes (unused) references to remotely hosted code remains in the bundle. I see several issues/comments about this on GitHub, and I would like to gain some insight into its current state....

@swc/types not resolving?

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: ``` 🟣 Plasmo v0.89.3...

How can I change tab title?

I'm still getting undefined as document.title in rendered html 😕

Plasmo with next-js routing?

I noticed that plasmo supports next.js in this example: https://github.com/PlasmoHQ/examples/tree/main/with-nextjs , but I am not sure how mounting works here? Typically with CSUI you indicate when and how to inject elements, but in this case I imagine the file-based routing is somehow leveraged? How does plasmo know what you want?

Is there a way to watch storage changes for all keys, or keys matching a prefix?

I want to get updates on all changes to storage, or all changes to keys matching "example_*"

Svelte 5 support in Plasmo?

Hey just curious if there are any plans to bring Svelte 5 support to Plasmo so we can use svelte.ts and svelte.js files and some of the newer neat syntactic sugar? Thanks.

Installation aborted because the add-on appears to be corrupt.

I submitted the build to firexfox using this command and it's giving me this error when I try to install it: plasmo build --no-minify --no-hoist --zip --target=firefox-mv2 Installation aborted because the add-on appears to be corrupt....
No description

Dynamically Injecting Content Scripts with Plasmo CSUI

I'm working on a browser extension and wondering about the feasibility of loading external scripts dynamically. I understand that Chrome Web Store policies are generally restrictive when it comes to dynamic script injection, especially for security reasons, but I'm interested in whether anyone has found long-term success with this kind of setup (for example for when different users are paying for different features). Specifically: - Has anyone been able to dynamically load external resources or scripts without facing issues during Web Store review or updates?...

Does each CSUI component get a separate React copy?

The Content Script documentation says: "A script that ends with .ts will not have front-end runtime (react/vue/svelte) bundled with it and won't be treated as a ui script, while a script that ends in .tsx, .vue or .svelte, will be." Just curious if each CSUI component gets its own copy of Reach or if somehow Plasmo manages to share the same React dep with all components. Thanks....

Simply adding a file to the root of the chrome-mv3 folder for dev and production when running plasmo

I need to add a schema.json file to the root (for development and production once distributed). Is there a straightforward way to achieve bundling the file and having it located in the root of the bundle? - it must be in the root - see above; so NOT in the assets folder...
Solution:
It's as easy as adding the file to the root and then including it in package.json's manifest 😰 `"web_accessible_resources": [ { "resources": [...

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()?

Toast

How can I dynamically inject PrimeReact Toast with its full styles into the currently opened webpage from a Chrome extension's popup? I want the Toast to remain hidden until a message is received from the popup, and I also want to make sure the animation works properly. Currently, the Toast appears without animation, and it only shows once. After the first display, it doesn't show again, even though there are no errors in the console logs. Are there any simpler UI libraries that can be used for...

error framework

#plasmo Hello, i am getting this error. When i trying to unitialize shadcn using pnpm dlx shadcn@latest init...
No description

Error in autogenerated prod index.js file

I am getting an error in the build -> chrome-mv3-prod -> static/background -> index.js file. I am guessing there is supposed to be quotes around the URL (see screenshots). Since this is auto-generated, when I run pnpm build, my changes get overridden. I am running Plasmo v0.89.2....
No description

Plasmo with react and MUI

After following the steps mentioned in the docs or example, mui is not working. It is throwing error defaultShouldForwardProp is not a function. Seems something to do with material ui itself. Anybody know any workaround for this?

Sending messages to a content script in the "main" world

What's the current best practice for sending messages from a background script/popup/sidebar to a content script running in the "main" world? So far I've succeeded only by using another content script (bridge) to intercept messages via listen() and then relay them to the other content script using window.postMessage(). For the opposite direction the "main" world script uses sendToBackgroundViaRelay() and the bridge uses relayMessage() to forward it to the background. Perhaps something like sendT...
Next