https://www.plasmo.com/ logo
#support-framework
Title
# support-framework
q

quaint-rainbow-21282

06/06/2022, 12:17 AM
help-schema-with-reloading
@User lets use this thread for the convo
m

microscopic-france-98666

06/06/2022, 12:18 AM
sure
q

quaint-rainbow-21282

06/06/2022, 12:18 AM
do you have any other files other than content.ts?
m

microscopic-france-98666

06/06/2022, 12:18 AM
i have a popup.tsx but ist like the default one included
l

limited-farmer-52140

06/06/2022, 12:20 AM
Can you send me the version of plasmo that is being run when using
pnpm dev
?
m

microscopic-france-98666

06/06/2022, 12:20 AM
0.37.1
i just did plasmo init today
q

quaint-rainbow-21282

06/06/2022, 12:22 AM
aight sounds good thanks a lot for the context. We'll try to reproduce it
m

microscopic-france-98666

06/06/2022, 12:23 AM
im making a super simple extension thats gonna be open sourced later anyways
want me to add you guys to the repo
q

quaint-rainbow-21282

06/06/2022, 12:24 AM
yeah sure
this is my github account: https://github.com/ColdSauce
m

microscopic-france-98666

06/06/2022, 12:25 AM
sure ill invite you guys let me publish it
just wanted to say your github and portfolio site is impressive and plasmo is a really useful toolchain
q

quiet-engine-70935

06/06/2022, 12:30 AM
@microscopic-france-98666 has reached level 3. GG!
q

quaint-rainbow-21282

06/06/2022, 1:44 AM
thanks! glad you're enjoying it! if you have any feedback/things that felt really good or should be improved, lmk!
figured out the issue btw, pushing a change now
m

microscopic-france-98666

06/06/2022, 1:57 AM
Bet
Thank you
q

quaint-rainbow-21282

06/06/2022, 1:57 AM
np
q

quiet-engine-70935

06/06/2022, 1:57 AM
@quaint-rainbow-21282 has reached level 6. GG!
m

microscopic-france-98666

06/06/2022, 1:58 AM
In #946313896174694470 you guys should probably just use the GitHub webhook lol
It looks kind of confusing in my opinion
q

quaint-rainbow-21282

06/06/2022, 1:59 AM
ooh interesting - what's the GitHub webhook?
m

microscopic-france-98666

06/06/2022, 1:59 AM
If you know what a discord webhook is
It can send directly into that channel with way better updates
q

quaint-rainbow-21282

06/06/2022, 2:00 AM
ah i see - yeah I think we use a web hook, but this isn't a Github log
m

microscopic-france-98666

06/06/2022, 2:00 AM
Ohh
q

quaint-rainbow-21282

06/06/2022, 2:00 AM
We have an engineering log we update throughout the day if anything big happens
m

microscopic-france-98666

06/06/2022, 2:01 AM
What are your plans for plasmo if u are ok with sharing cause u worked at fb and a bunch of cool places so u might have something big in mind
q

quaint-rainbow-21282

06/06/2022, 2:01 AM
the weird characters that you're seeing on the discord captain log are a secret waiting to be uncovered
m

microscopic-france-98666

06/06/2022, 2:02 AM
Ohhhh
Also if I reinstall my npm packages in the repo it should work normally again?
q

quaint-rainbow-21282

06/06/2022, 2:03 AM
yeah i think just a pnpm i should work because plasmo is pointing to latest @limited-farmer-52140 correct me if I'm wrong
l

limited-farmer-52140

06/06/2022, 2:03 AM
yeah I think so - just check the version when you run
pnpm dev
- the latest most stable is now
0.38.0
m

microscopic-france-98666

06/06/2022, 2:04 AM
ok i can try that rn
q

quaint-rainbow-21282

06/06/2022, 2:10 AM
we wanna make building browser extensions awesome. everything will revolve around that key idea
m

microscopic-france-98666

06/06/2022, 2:10 AM
still installing old version for me
q

quaint-rainbow-21282

06/06/2022, 2:11 AM
what does your package.json look like for devDependencies
l

limited-farmer-52140

06/06/2022, 2:12 AM
the lockfile probably locked it
so you will need to do
pnpm up -irL
or try removing the lockfile and do
pnpm i
m

microscopic-france-98666

06/06/2022, 2:13 AM
i just updgraded everything lets see now
q

quaint-rainbow-21282

06/06/2022, 2:13 AM
🤞
m

microscopic-france-98666

06/06/2022, 2:58 AM
It works perfectly now forgot to update
Thank you
l

limited-farmer-52140

06/06/2022, 2:58 AM
🔥
f

flat-state-13182

06/10/2022, 10:09 AM
Sorry for butting in, I also had the same issue where plasmo wasn't reloading the content scripts
It got fixed when I installed parcel on my project dev dependencies, though (I needed to do it in order to make scss work properly, otherwise plasmo would complain about pnpm not being able to install the dependencies)
q

quaint-rainbow-21282

06/10/2022, 11:22 AM
Hey @flat-state-13182, thanks for letting us know. Looks like there were two problems you were facing: - In order to use scss, you had to add Parcel to your devDependencies - Plasmo didn't do live-reloading on content scripts until you added Parcel to your devDependencies Is that right? I'll add these as tickets and we'll likely investigate next week.
s

swift-answer-82009

06/10/2022, 11:22 AM
Gave +1 Rep to @User
f

flat-state-13182

06/10/2022, 11:25 AM
Yeah, that would be correct. To be more specific, I had to add the following packages:
Copy code
"@parcel/core": "^2.6.0",
    "@parcel/transformer-inline-string": "^2.6.0",
    "@parcel/transformer-sass": "^2.6.0",
q

quaint-rainbow-21282

06/10/2022, 11:31 AM
Thanks for the context. We'll look into it
f

flat-state-13182

06/10/2022, 11:38 AM
Just for some extra info, I restored the project to the previous broken state, here's the error that plasmo gives:
Copy code
> plasmo dev

🟣 Plasmo v0.40.0
🟠 The browser extension development framework.
🔵 INFO   | Starting the extension development server...
🔴 ERROR  | Failed to install @parcel/transformer-sass: pnpm failed to install modules
          | Error: Failed to install @parcel/transformer-sass: pnpm failed to install modules
    at $32ea97b83cf5d752$var$install (/home/kuro/project/new-chrome-extension/node_modules/.pnpm/@parcel+package-manager@2.6.0_@parcel+core@2.6.0/node_modules/@parcel/package-manager/lib/index.js:3688:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async $b0fd219fea43bcac$export$2e2bcd8739ae039._runFn (/home/kuro/project/new-chrome-extension/node_modules/.pnpm/@parcel+utils@2.6.0/node_modules/@parcel/utils/lib/index.js:32339:13)
    at async $b0fd219fea43bcac$export$2e2bcd8739ae039._next (/home/kuro/project/new-chrome-extension/node_modules/.pnpm/@parcel+utils@2.6.0/node_modules/@parcel/utils/lib/index.js:32332:9)
And this was the
package.json
used
Copy code
json
{
  "name": "test-extension",
  "displayName": "Test Extension",
  "version": "1.0.0",
  "description": "This is a test",
  "author": "me",
  "scripts": {
    "dev": "plasmo dev",
    "build": "plasmo build"
  },
  "dependencies": {
    "react": "18.1.0",
    "react-dom": "18.1.0"
  },
  "devDependencies": {
    "@trivago/prettier-plugin-sort-imports": "3.2.0",
    "@types/chrome": "0.0.188",
    "@types/node": "17.0.40",
    "@types/react": "18.0.12",
    "@types/react-dom": "18.0.5",
    "plasmo": "0.40.0",
    "prettier": "2.6.2",
    "sass": "^1.52.3",
    "typescript": "4.7.3"
  },
  "manifest": {
    "host_permissions": [
      "https://*/*"
    ]
  }
}
q

quaint-rainbow-21282

06/10/2022, 12:02 PM
Cool thanks for the context! We'll take a look this weekend probs. @limited-farmer-52140 ^
s

swift-answer-82009

06/10/2022, 12:02 PM
Gave +1 Rep to @User
4 Views