🧩 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

Parcel-bundler issues

https://github.com/parcel-bundler/parcel/issues/5557 I'm pretty sure I'm running into some error like this github issue, my console from a cs webpage says "Uncaught TypeError: (0 , $parcel$interopDefault(...)) is not a function" when I try and use a hash function from 'imurmurhash' and it's been a pain to debug as my dev build runs fine, it's only the output dist (even with the --no-minify flag) that has errors! Parcel-bundler (v1) is depreciated in favour of the other parcel package (v2) https://www.npmjs.com/package/parcel-bundler ...

[EXP] How to display a component below or above a text selection

reposting a question from issues on GH because because seen few people need examples on how this could be properly implemented Showing a component above/below a selection is a behavior that many extensions use, for example google translator, dictionary, grammarly, etc. I would like to see an example of how this behavior should be implemented....
No description

How do I use `tslog` (esm)

I honestly don't understand es modules that well. I know how it's intded to work but never really understood the interop modes with typescript and other bundlers. I'm trying to use tslog which is exported as an es moudle but when I do a standard import and try to use it, I get logger.ts:6 Uncaught TypeError: _tslog.Logger is not a constructor. Any ideas on what I should be doing?

Watch STORAGE from CSUI or Send message from backgrounds to CSUI

Hello, I have a CSUI with these settings: `{ matches: ["https://web.whatsapp.com/"], all_frames: true,...

Can I use a plasmo project in monorepo with turborepo?

I want to share a lot of packages of my web and backend with the plasmo project using a monorepo like turborepo.

Web Bluetooth API?

Hi! I'm currently experimenting with rebuilding an existing extension using Plasmo, the extension uses the Web Bluetooth API and I was wondering if it is possible to use in Plasmo, if so are there any special things I should / need to do to set it up?

How to mount component when clicking on a element with certain class?

What I'm doing is I'm marking some certain HTML tags and giving them a class, I want to mount a component not when the page loads, but when user clicks on specific element https://www.plasmo.com/blog/posts/content-scripts-ui - I pretty match want this example with Toucan. I've searched the docs, but didn't really find what I need....

Extension runtime is not available

Hi when i try to send a message from a CSUI to a background throws an error "rror: Extension runtime is not available" How do I communicate from a csui with the rest of the application?...

can i send a message from a CSUI directly to popup.ts and vice versa?

Hello, can I send messages directly from CSUI to popup.ts? or do I really need to create the message inside the background folder and then send it to where I want it?!

How to use a component library on Contents?

Hello, I would like to use a component package (https://primevue.org/) inside the content folder files. To add to popup/options/newtab etc we have a defineOptions method: ```JS defineOptions({...

Getting Tailwind to work in content scripts

I'm following the instructions from https://docs.plasmo.com/quickstarts/with-tailwindcss, with the exception that I did not pnpm create plasmo --with-tailwindcss because my project was already started. However I did all the other stuff. I think I must be doing the getStyle export wrong? The style is not being injected. any idea what may be going wrong? This is my content script: contents/my-content-script.tsx...

Parcel throwing an error in production

As described here: https://github.com/PlasmoHQ/plasmo/issues/661, the following error is thrown:
Could not resolve bundle with id
Could not resolve bundle with id
...

How to use Plasmo's globalProvider?

For tanstack query, I need to have a global provider for all of the getInlineAnchorList(). I saw that this should be possible through this github pull but I haven't been able to get it to work. Does anyone have a working example? https://github.com/PlasmoHQ/plasmo/pull/557...

Putting Key in manifest causes ``Uncaught Error: Extension context invalidated.

Removing the key makes it work but my problem is that I'm trying to generate the same extension ID so that I could use Clerk locally. Any ideas on how to fix?...

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")...