🧩 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

createRootContainer returns null

```export const render: PlasmoRender<PlasmoCSUIJSXContainer> = async ({ createRootContainer }) => { const rootContainer = await createRootContainer() if (!rootContainer) return console.error("Root container not found")...

Content match help

I'm looking to match any urls on facebook or tiktok domains. I currently have
matches: ["https://*.tiktok.com/*", "https://*.facebook.com/*"]
matches: ["https://*.tiktok.com/*", "https://*.facebook.com/*"]
. But it doesn't work for other domain endings like facebook.eu/, I'd want to be able to match any domain ending. ...

Cannot import package that exposes .mjs files instead of .js files

Hey! I wanted to use lucide-react on my project and used a regular import. However, this error is shown: Failed to resolve 'lucide-react' from './contents/button.tsx'
'./dist/esm/lucide-react.js' does not exist, did you mean './di
st/esm/lucide-react.mjs'?'
'./dist/esm/lucide-react.js' does not exist, did you mean './di
st/esm/lucide-react.mjs'?'
...

Upgrade to v0.81 not working as expected

I'm trying to upgrade to v0.81, but there is something wrong going on. It says Failed to resolve '.plasmo/chrome-mv3.plasmo.manifest.json', but I can see the file in the .plasmo folder. Here's the generated file ``` { "icons": {...

Is it possible to pass custom next.config.js?

Is it possible to pass a custom next.config.js for the nextjs starter repo? Or would it be possible to specify babel as the bundler for plasmo instead of parcel? I'm trying to use this adapter: @expo/next-adapter. It looks like it supports Next.js with SWC, but the adapter is imported in the next config file. Thanks for the help!

Plasmo With Stripe

Has anyone recently been able to successfully setup this example with stripe - https://github.com/PlasmoHQ/examples/tree/main/with-stripe ? I followed the official guide (https://docs.plasmo.com/quickstarts/with-stripe) word by word but I end up with "Unchecked runtime.lastError: OAuth2 not granted or revoked." whenever I open the extension....

Create CSUI root containers programmatically

I've read the page about the life cycle of Plasmo CSUI but I'm still not sure how I could create root containers (and render a component inside it) programmatically rather than declaratively. For my extension I want to append inline CSUI to certain DOM elements, but these are sometimes removed from the DOM and added again at certain circumstances. I'm getting messages from my BGSW which should trigger a search for a list of these target anchors, followed by rendering new CSUI where necessary....

Type error in mountInterval of PlasmoCSUIMountState

I want to execute clearInterval(mountState.mountInterval) in getRootContainer, but the type of mountInterval in PlasmoCSUIMountState is NodeJS.Timer. I think number is the return type since CSUI runs in a browser....

Send data from website to firefox extension service worker

Hi how can I send data to my firefox extension? In chrome I'm using chrome.runtime.sendMessage but in firefox when I try with browser.runtime.sendMessage() Im getting error: Uncaught ReferenceError: sendMessage is not defined

Sandboxes not applying CSP!

I'm having lots of problems with applying my custom csp to my sandboxed page. I have in my manifest overrides
"content_security_policy": {
"sandbox": "sandbox allow-scripts; script-src 'self' https://apis.google.com"
},
"content_security_policy": {
"sandbox": "sandbox allow-scripts; script-src 'self' https://apis.google.com"
},
However my CSP is always: ...

Plasmo requesting more permissions than requested?

I've noticed bugs(?) that I think are related - and might have to do with me using Vue? For my CSUI, I have the following script: ``` <script>...
No description

Login with firebase using google auth

I'm trying to log in my users using the google login but I always have this error after following the tutorial about firebase & google auth: "OAuth2 request failed: Service responded with error: 'bad client id: client_id_from_gcp...

Persist Supabase auth session/user state

I'm really struggling to figure out how to persist a login state with my extension - I'm using Supabase and Vue (so unfortunately I can't use the boilerplate code exactly - with the user state watcher). I've noticed a few things: - State doesn't carry over between tabs (neither existing nor new ones) - It seems as though, state is "locked" to the parent domain, I login in on - ie. I'm logging the user in within a CSUI and if it happens to be overlayed on linkedin, the logged in state will be recognized when I return to that domain but not others...

How can load multiple JS in the content script file

I have file contents/after-load.ts which runs at document_end and I want to load a script chrome.runtime.getUrl("scripts/css-selector-get.js")

Plans to add @use as an import resolution?

I've imported a bunch of components into my project, but the sass files of the components use @use to get styles from other files. I found the Import Resolution documentation page and saw everything is imported with an 'import' statement. Since the use of @use is so imbedded in the components I have installed, I would just like to ask if there is a way to get the bundler to pick up on the other sass files that use @use?...

"No supported UI library found" for Svelte 3

It works for Svelte 4 but not Svelte 3 🤨 Plasmo version is 0.77.5...

getInlineAnchor loops infinitely in React application

Hello, I am trying to add a new button to Twitter using getInlineAnchor, but I get an infinite loop and my browser crashes. ```html <div role="navigation"> <div></div>...

CSUI not working on safari

Hi when I try to load content script I'm getting Error in safari console: Could not resolve bundle with id 8Ly6c
No description

How to make css module work in devtools panel page ?

Hi, I want to use @devtools-ds/object-inspector in devtools panel page, which uses css module, but the style of the third componet does not seem to work. I can see the build file of souce css file, but I cannot to figout out how to import it in the html tempalte. Anyone has some suggestions? Thanks.