nahtnam
Explore posts from serversPD🧩 Plasmo Developers
•Created by nahtnam on 11/20/2023 in #👟framework
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
2 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 11/5/2023 in #👟framework
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?8 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 11/5/2023 in #👟framework
.html relative imports
Hey
I'm trying to move my project into a monorepo.
I used to have:
now I have
which results in the error:
The index.html is in
apps/dash/src/newtab/index.html
, and the image is in apps/dash/src/assets/images/favicon.png
5 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 8/21/2023 in #👟framework
How do I use `tslog` (esm)
I honestly don't understand es modules that well. I know how it's intded to work but never really understood the interop modes with typescript and other bundlers. I'm trying to use
tslog
which is exported as an es moudle but when I do a standard import and try to use it, I get logger.ts:6 Uncaught TypeError: _tslog.Logger is not a constructor
. Any ideas on what I should be doing?17 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 7/27/2023 in #👟framework
Firefox Permissions Transform
I have the following in my package.json
However building with the
firefox-mv3
target, I get a huge blurb of errors:6 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 6/1/2023 in #👟framework
Background Keep Alive Fails
@lab Didn't want to crowd the github issue but I'm not able to use the keep alive function:
and as a result:
Service worker registration failed. Status code: 15
I unfortunately can't even open the debug tools but here is the full generated file if that helps: https://gist.github.com/nahtnam/e6864b9cc5d5c64ed00afaca4ef3c2299 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 5/30/2023 in #🔰newbie
Am I using Port Messaging correctly?
I have the following:
background/ports/alarms.ts
background/index.ts
foreground/somewhere.ts
finally in foreground/index.tsx
I see
adding listener
in the console but whenever the alarm is triggered I get this error: checked runtime.lastError: Could not establish connection. Receiving end does not exist.
7 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 5/24/2023 in #👟framework
How do I analyze the bundle?
I noticed my app bundle increased from 8mb to 40mb after I installed a couple of deps. Is there a way I can figure out exactly what is causing the larger bundles?
37 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 5/20/2023 in #👟framework
v0.71.0 builds broken
63 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 5/20/2023 in #👟framework
react-router HMR Issues when lazy-load
Is HMR working correctly for everyone? I noticed that it's no longer working for me and I have to manually refresh the page each time. The only major change I did was switch to the new React Router 6.4 system: https://reactrouter.com/en/main so it might be that
172 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 3/17/2023 in #👟framework
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
(The env var is set via direnv
, i'm not using a .env.local
file
Anyone able to reproduce? Should I create a GH issue?5 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 3/17/2023 in #👟framework
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)7 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 3/2/2023 in #👟framework
TSConfig Includes
I noticed this line in my tsconfig:
Im pretty sure the plasmo lines were added by plasmo, and I consistently have
tsc --noEmit
fail because of it:
Is it safe to remove?2 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 2/20/2023 in #👟framework
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)
36 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 2/16/2023 in #👟framework
Prettier Sort Doesn't Work With Satisfies
Just pointing this out because its part of the default init: https://github.com/prettier/prettier/issues/13951
6 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 2/11/2023 in #👟framework
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
4 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 2/5/2023 in #👟framework
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:
11 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 1/31/2023 in #👟framework
BPP Error
Hello,
Just ran into this error:
However I looked in the dev store and it looks like it did publish that version. What I had done was go into the settings, turn on in app purchases, save draft, then run this deployment so it could be that the draft messed things up.
14 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 1/28/2023 in #👟framework
Lightning CSS Issues
After updating plasmo my github action keeps failing due to:
25 replies
PD🧩 Plasmo Developers
•Created by nahtnam on 1/10/2023 in #👟framework
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
14 replies