🧩 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

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

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