🧩 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

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

Version ENV Variable

Is there an env variable for the version number of the build? I.e. the version number in the package.json? Don't see it here: https://docs.plasmo.com/framework/env...

Wrong host permissions

I just discovered that despite instructing Plasmo to only run on https://www.skillshare.com/* (https://github.com/avi12/skillshare-player-control/blob/a71baa498bf8956441f98068bcf0c343f281126b/src/content.ts#L15) I'm getting this...

Remote Code fails build

Hey, If I add this line import 'https://tally.so/widgets/embed.js';, it works in the dev server but fails my build with the following error: ```...

BPP Error

Hello, Just ran into this error: ``` Error: 🔴 ERROR | Error: chrome: Step 1) Item ""myID___" (caddie)": Response code 400 (Bad Request)...

Firefox unsupported background script

Turns out that Firefox officially supports Manifest V3, but not in the same way that Chromium supports it One major way that they differ in is the background script: https://blog.mozilla.org/addons/2022/05/18/manifest-v3-in-firefox-recap-next-steps/#:~:text=privacy%20tools%20available.-,Event%20Pages,-Chrome%E2%80%99s%20version%20of TL;DR background.service_worker is not supported, so Firefox must be a special use-case in Plasmo...

Lightning CSS Issues

After updating plasmo my github action keeps failing due to:
Could not resolve module "/home/runner/work/caddie-dash/caddie-dash/node\_modules/lightningcss/lightningcss.linux-x64-gnu.node" from "/home/runner/work/caddie-dash/caddie-dash/node\_modules/lightningcss/node/index.js"
Could not resolve module "/home/runner/work/caddie-dash/caddie-dash/node\_modules/lightningcss/lightningcss.linux-x64-gnu.node" from "/home/runner/work/caddie-dash/caddie-dash/node\_modules/lightningcss/node/index.js"
...

Errors in Log, Webpage inspector

Not sure if this is plasmo or tailwind, but it is quite annoying, and clogs up the console

React Devtools

Has anyone had any success using the react devtools in the new tab page? The redux one works but not the react one for some reason. I went to the chrome extension settings and gave it permissions to access file URLs but that didnt help

chrome.identity is undefined

I'm trying to do chrome.identity.getRedirectURL but getting the following error
Uncaught TypeError: Cannot read properties of undefined (reading 'getRedirectURL')
Uncaught TypeError: Cannot read properties of undefined (reading 'getRedirectURL')
...

Project won't re-package

I have projects A and B When I pnpm dev --verbose in B, it works fine When I pnpm dev --verbose in A, it's stuck on ``` 🟡 16 | Starting dev server on 1012, HMR on 1815......

Live reloading Discussion

Bug, discuss, implementation detail, how to improve Live reloading in Plasmo

Creating tests for CSUI React components with Jest

Heyo. I've been toying with the jest example in order to implement tests in an extension, but the lack of documentation and complexity of the example is giving me a lot of headaches getting everything working. The example doesn't deal with any imports in the example component, neither from static files, style files, parcel bundler imports, etc... So it makes it quite hard to figure out how to make it work with components that have any of them. Jest will complain to no end about it. Also, I'd rather deal with a different folder structure than having every test isolated in a single directory. I'd rather have each test stay with their respective tsx and scss component files, but the example configuration is quite obtuse as how it parses the test files (does it just look for the .test.ts(x) extension regardless of the location?)...

Mantine modals not rendering + styles are broken

I'm using a modal with https://mantine.dev/ but it's not rendering on the screen. When I inspect the modal, I'm only then able to see it on the bottom of the page and the mantine styles are not being applied to it