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 consoleReact 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
using getInlineAnchorList with Mantine
I'm trying to inject a Mantine button into multiple components at the same time using
getInlineAnchorList()
using document.querySelectorAll()
and only the first button is rendering properly, the rest are unstyled
mantine buttonsUsing Plasmo with Mantine
I was able to successfully use https://mantine.dev/ for all my react components in the google extension popup, but I'm not able to get it to properly render the components in the injected react components
Storage hook `undefined` during initial render
Hey! I'm using the
useStorage
hook and noticed that during the initial render, it is undefined
(default value) and then gets populated with the value from storage. I understand why this is the case (async data store vs sync rendering), however is there any way we can make it so that all storages are loaded before the rest of the application shows (i.e. no initial render with default values)?Wrong offered argument in PlasmoMountShadowHost
https://github.com/PlasmoHQ/plasmo/blob/51010593098d2871dc49c93b0cb22ba415221298/cli/plasmo/src/type.ts#L55-L60
compared to
https://github.com/PlasmoHQ/examples/blob/de42aa8fe74e2b025fa582112d59795c7c04ba4e/with-svelte/contents/plasmo-inline.svelte#L15-L20...
How to access the current anchor in CSUI
Would it be possible to get current anchor inside the content component?
Like if I'm mounting to multiple anchors and the logic needs to get input from a child element of that specific element
@Jenya : https://discord.com/channels/946290204443025438/946290204904390690/1057702630404653057...
Svelte - Unexpected token (parse-error)
It seems like Parcel fails to parse this in a Svelte popup:
```ts
const errorMessage = {
youtube: "Cannot assign. Used by YouTube",
alreadyInUse: "Cannot assign. Already in use"...