🧩 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

Type error on CSUI

I copied and pasted the example (https://docs.plasmo.com/framework/content-scripts-ui/life-cycle#custom-renderer) of the docs and it's throwing errors. Anyone knows how to fix? (ignore the component error, it does not exist)...

MUI Select component attachment point in CSUI?

Just wondering if anyone else has ran into this and what the correct fix should be. Seems like for <Select> components in CSUI when you open the dropdown the corresponding <Popover> doesn't attach to the correct element, and is appended to the document body instead, leading to the dropdown being rendered at the bottom of the page rather than directly underneath the <Select> input. The following queries also return null/empty. What am I missing here?
console.log(document.getElementById('plasmo-shadow-container')) # null
console.log(document.getElementsByClassName('plasmo-csui-container')) # []
console.log(document.getElementById('plasmo-shadow-container')) # null
console.log(document.getElementsByClassName('plasmo-csui-container')) # []
...

CSUI Styling React components without getStyle() on each component

Long time no see! I haven't been keeping up lately with Plasmo, I'm surprised with how much it has changed over a few months. Congratulations in the progress! That said, I'd love to know if there's still no way to style content scripts by just importing the style files in each individual component. Something like this, without using getStyle(): ```js...

vscode error opening .plasmo/static/common/*.tsx and .plasmo/static/common/*.ts files

how do i fix these errors in .plasmo/static/content.tsx ``` [{ "resource": "/extensionname/.plasmo/static/content.tsx", "owner": "typescript",...

browser.tabs.query({}) functionality?

Hi, is there a plasmo API to interface with the browser.tabs.query({}) API> If not, it would be nice to see, I've got a usecase for it where I need my background script to send a message to my content script. I know it would be possible to use the current plasmo messaging API to poll for new data, but that seems rather inefficient. I may be missing something here, but it doesn't seem to be possible to just send a message to the content script, without the content script having to request to be sent something....

CS Config Not evaluated?

``` export const config: PlasmoCSConfig = { matches: process.env.NODE_ENV === "production" ? ["<all_urls>"]...

Import an external CSS in a popup

Seems like the only way to import Svelte Material UI is by using <link>: https://sveltematerialui.com/INSTALL.md What's the way to import in a popup?...

Env vars broke in `v0.67.3`

Hello, I updated to v0.67.3 and my app broke. In src/newtab/index.tsx I tried console.log('b', process.env.PLASMO_PUBLIC_SUPABASE_URL); but it logs undefined. Downgrading to 0.66.0 works fine though. Additionally verified through...

Fail Build Programatically

Hello, Is there a way to fail the build command through code? My use case is that I would like to assert that certain env variables are set during the build, and if not, throw. I tried adding a top level throw, however that doesn't fail the build (I assume rollup or whatever plasmo uses does not execute the files). I also tried process.exit(1) but didn't work (because the file itself is not being executed on build)...

React.jsx: type is invalid.

Hey! Recently converted an extension I was developing from custom React to Plasmo + React. I have a contents folder with VideoBadge.tsx(the main component that gets mounted into pages) + a components folder where I store all the components for VideoBadge. The thing is that when I edit something inside the components folder and reload, this always happens. Everything works fine but this error appears

TSConfig Includes

I noticed this line in my tsconfig:
"include": [".plasmo/index.d.ts", ".plasmo/**/*", "./**/*.ts", "./**/*.tsx"],
"include": [".plasmo/index.d.ts", ".plasmo/**/*", "./**/*.ts", "./**/*.tsx"],
...

Local Plasmo

How do I kickstart Plasmo locally after cloning it?

@plasmohq/storage doesn't work in Edge in iframe

From what I can tell, it's due to the localStorage being inaccessible by default I do have a feeling though that CSP can solve it...

Chunked messaging flow

Hey guys, I was wondering wondering if chunked messaging was ever considered for @plasmohq/messaging, or if it is part of the roadmap. A few months ago when experimenting with the native chrome.runtime messaging API, I've found that if you're trying to send a large message to the background, it fails to do so. I've solved this in the ArConnect extension by having multiple messages with chunks of the data i'm sending, but I'm wondering if a native support for this, built into the messaging library was more appropriate. ...

chrome.identity.launchwebauthflow alternative

Hey! I wanted to open up a discussion on an alternative for chrome.identity.launchwebauthflow because the firefox version is buggy (https://github.com/mozilla/webextension-polyfill/issues/248) and Safari doesn't support it at all. I'm exploring a couple of options including just opening a new tab but wanted to see if anyone has experience here and can provide pointers. One of the pros of using a new tab/window is that if the user has Google Pay set up, it will work for stripe (unlike in launchwebauthflow) and if they have a password manager it will autofill logins for the user. Here is what I have so far (not much)...

Easier mobile browser testing

Right now, to test that the extension works on mobile browsers (like https://kiwibrowser.com), I need to: 1. Download Android Studio 2. Create an AVD (Android Virtual Device) with preinstalled Play Store 3. Log into a dummy Google account for testing 4. Download & launch Kiwi browser, go to Extensions...

Inject options UI in the browser

```json { "manifest": { "options_ui": { "browser_style": true...