🧩 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

Failed to resolve '...' from '...'

Hoping to get some eyes on this issue on GH as I am currently unable to use react-markdown package with Plasmo https://github.com/PlasmoHQ/plasmo/issues/774#issuecomment-1837268430...

plasmo with shadcn ui components, style of shadcn ui component not work in content script ui

tailwind css config likes below, and I also replace :root to :host by related post searched: export const getStyle = () => { const style = document.createElement("style"); style.textContent = cssText.replaceAll(':root', ':host'); return style;...
No description

Can I build just the content script, without any additional assets/html etc?

I want to run a cli to build just the JS content script and nothing else. Is this possible?

Sharing import scheme or at least ignore them with NEXTjs

I want to use nextjs with plasmo, but imports like data-url:~assets/my-asset.png don't work inside nextjs, how to configurate the nextjs config so thoses imports works correctly ? Its says in the docs that both are using swc under the hood right ?

refreshUncaught SyntaxError: Unexpected identifier 'HMR'

May I know why i have that error? And the live refresh isn't working now
No description

I would like to create a Welcome page within my extension

I would like to create a Welcome page within my extension. According to the following URL, it's stated that when creating a new extension page, it needs to be manually updated. https://docs.plasmo.com/framework/ext-pages Heads up! Make sure to refresh your extension manually when creating a new browser extension page as our runtime might not be listening and might not update in certain cases. ...

Can I use only the CSUI Injection code from the plasmo repo?

Can I build a standalone content script that uses the CSUI framework? I want to use it and extend it for my own specific use cases

Specify different icon path

Setting up a repo mixing in next.js and plasmo. Would be nice if I can configure where https://docs.plasmo.com/framework/icon so that I can scope it all in a subfolder called plasmo

how to use vue ui such as primevue

it is hard to work,we need demo.

Any idea how to inject a MUI createTheme into CSUI?

Tried ``` <CacheProvider value={styleCache}> <ThemeProvider theme={mysterianTheme}> <AppPage />...

Error processing content_security_policy.extension_pages: ‘script-src’

I'm getting this error in Firefox MV3. Reading manifest: Error processing content_security_policy.extension_pages: ‘script-src’ directive contains a forbidden http: protocol source This is the code of the line that is calling the API. The PLASMO_PUBLIC_BASE_PATH is "http://localhost:8080" const myApi = new Api(new Configuration({ basePath: process.env.PLASMO_PUBLIC_BASE_PATH, apiKey: process.env.PLASMO_PUBLIC_CLIENT_API_KEY }))...

Injecting Content Script UI on Extension Click (and disabling popup)

I've got the popup disabled already by renaming the file. However, I'm still trying to figure out how to dynamically inject a content script UI on to the page when the extension is clicked. The end functionality of the extension should be a UI that appears on screen instead of a popup. So far my background/index.ts file looks something roughly like this: ```js import menuUrl from './injected_helper'...

Does Plasmo support Vue HMR for Content scripts?

Hey all, this might be a stupid question but I wasn't able to confirm this using docs and haven't found anything regarding that on search. I want to use Vue(Vue3 with typescript) for my content scripts but I had troubles setting up HMR....
Solution:
We haven't dive deep into the vue runtime to inject their HMR into CS

Tilde Import for `.mjs`

Hey! I recently renamed a file from .ts to .mjs and I noticed that it's now unable to be imported via ~config/env.mjs (located in /src/config/env.mjs). It used to work when it was a .ts file. I think it's due to this: https://docs.plasmo.com/framework/import#tilde- Any reason .js and .mjs aren't a part of this?

.html relative imports

Hey I'm trying to move my project into a monorepo. I used to have:...

How to make tab pages with vue?

I want to imgrate my code from electron to chrome extension.I can use vue at root,but tabs/ did not seem to work.

How to use shadcn-ui stylings in content script?

Hi, just starting out with a new extension and Plasmo seems too good to not give it a try! Since our brands UI is heavily relying on shadcn's styling, we're looking to also utilize it in our planned chrome extension. Sat down and managed to set it up for the popup, however no matter what I'm trying, shadcn components don't render properly using the content script....

MUI select components don't inherit styling

I'm struggling to get MUI <select> components to render correctly. I have a basic component which renders a few <MenuItems> and for some reason the <MenuItems> render at the bottom of the page completely outside of my extension. I have the styleCache and everything setup correctly and literally all of the styling is working except for the select/menuitems. Is there something in particular I need to do for this?

Extension fails to run due to Parcel - The Expression evaluated to a falsy value

About four days ago, I ran into an issue where the extension would fail to run with the following error: ``` 🟡 3 | @plasmohq/parcel-runtime Injecting << background-service-runtime >> for static/background/index.js c338908e704c91f1 /home/user/project/browser-extension/.plasmo/static/background/index.ts 🔴 ERROR | The expression evaluated to a falsy value:...

CSUI main world on Firefox MV2 (Unexpected property "world" for scripting.registerContentScripts)

i'm trying to inject my content script UI to the main world - it's working as intended with plasmo dev --target=chrome-mv3, but it's not working for plasmo dev --target=firefox-mv2 (no CSUI shows up on the page). is injecting to the main world supported for mv2? if not, are there any alternative ways to execute a pre-existing function from the main world and return the data to the CSUI? thanks! the error in devtools is: Uncaught Error: Type error for parameter scripts (Error processing 0: Unexpected property "world") for scripting.registerContentScripts. (screenshot attached) possibly relevant project information:...