🧩 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

Cannot read property of null (reading '__plasmo_full_reload__')

Version 0.82.0 This is from the background.ts...
No description

Storage advanced usage non-hook implementation.

I see in the docs that there is an advanced usage section that mentions how to use a render value for realtime input. My usecase is i am trying to store a stream of chunks coming into a variable. It seems that sometimes the store (set function of the useStorage hook) takes too long and chunks are lost because of this. I assume the render value method was made to address situations like this. Is there a way to use the render value / setStoreValue with the basic storage API? ...

Firefox Permissions Transform

I have the following in my package.json ``` "manifest": { "key": "$CRX_PUBLIC_KEY", "permissions": [...

PlasmoGetInlineAnchorList doesn't shift host layout

I'm looking to inject elements onto the page whenever more content is loaded. The content would be a button under every post. I've exported a getInlineAnchorList function but the button is being overlayed on each post rather than inline with the existing HTML. i.e. I want the extra button to look "naturally placed" onto the content rather than just an overlay How would I fix this issue?...

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?...