https://www.plasmo.com/ logo
Join Discord
Powered by
# support-framework
  • q

    quiet-electrician-41149

    08/24/2022, 8:07 AM
    Sorry I can't see the message I just sent (maybe it got deleted?). I was just wondering, is the google tag manager script that is in the docs supposed to work for local development or only for the build?
    s
    • 2
    • 1
  • w

    wonderful-jewelry-41731

    08/24/2022, 11:46 AM
    Hello, I'm using the
    with-jest
    as a starter to try jest, it works fine until I import a class where i'm importing
    @plasmo/storage
    here is the error:
    Copy code
    src/tests/bg/tabs.test.ts
      ● Test suite failed to run
    
        Cannot find module '@plasmohq/storage' from 'src/bg/local-storage.ts'
    
        Require stack:
          src/bg/local-storage.ts
          src/bg/tabs.ts
          src/tests/bg/tabs.test.ts
    
    > 1 | import { Storage } from "@plasmohq/storage"
            | ^
          2 |
          3 | /* 
          4 | Cache: chrome.storage.local
    
          at Resolver._throwModNotFoundError (node_modules/.pnpm/jest-resolve@28.1.3/node_modules/jest-resolve/build/resolver.js:491:11)
          at Object.<anonymous> (src/bg/local-storage.ts:1:1)
    
    Test Suites: 1 failed, 1 total
    Tests:       0 total
    Snapshots:   0 total
    Time:        8.707 s
    Ran all test suites.
     ELIFECYCLE  Test failed. See above for more details.
    I think jest is trying to import the package from
    src
    as in the config file we have :
    Copy code
    moduleNameMapper: pathsToModuleNameMapper(tsconfig.compilerOptions.paths, {
        prefix: "<rootDir>/"
      }),
    How can I fix this ?
    s
    • 2
    • 2
  • q

    quiet-engine-70935

    08/24/2022, 11:46 AM
    @wonderful-jewelry-41731 has reached level 2. GG!
  • q

    quiet-electrician-41149

    08/30/2022, 4:37 PM
    Is there supposed to be HMR/fast-refresh? I noticed every time I make a change, the whole extension reloads (which is mostly okay) but I just wanna make sure I didn't make a change that broke HMR if it was there
    s
    l
    • 3
    • 2
  • t

    thousands-horse-90118

    08/31/2022, 2:25 AM
    I'm getting an error when running my extension in "dev" mode, and I'm wondering if anyone has encountered anything similar. There is some code in the generated background.js that ends up throwing a runtime error:
    Uncaught TypeError: Cannot read properties of undefined (reading 'fetch')
    . The offending line is the following:
    exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream);
    Note, the error does not occur in the production build, so I do suspect the issue is build / framework related.
    s
    • 2
    • 1
  • f

    flat-state-13182

    09/01/2022, 3:25 PM
    I'm trying to implement an options page in the extension I'm working on, but it doesn't seem to be working alright. The example works fine, but when I copy and paste the exact same
    options.tsx
    file into my project it creates a blank page. The console logs for the option page show that there is an issue importing React, so I guess this is another issue caused due to my particular project setup using a relative import for react in my
    package.json
    , but it would be nice to work around it somehow.
    s
    • 2
    • 4
  • r

    rhythmic-machine-85586

    09/01/2022, 6:19 PM
    I'm completely new either to this framework and development. I set up framework when I'm making changes in the package.json file in a terminal I see 🔵 INFO | package.json changed, update manifest overides 🔵 INFO | ✨ Extension reloaded in 608ms! 🔵 INFO | package.json changed, update manifest overides 🔵 INFO | ✨ Extension reloaded in 761ms!
    s
    l
    • 3
    • 2
  • q

    quiet-electrician-41149

    09/02/2022, 12:18 AM
    How can I go about adding a listener to open a new tab on install
    Copy code
    chrome.runtime.onInstalled.addListener(function (){
      chrome.tabs.create({url:chrome.extension.getURL("options.html")},function(){})
    })
    s
    l
    • 3
    • 2
  • q

    quiet-electrician-41149

    09/02/2022, 12:38 AM
    Copy code
    🟣 Plasmo Browser Platform Publish v2
    🟡 QUEUE  | Prepare for chrome submission
    Error: 🔴 ERROR  | Error: chrome: Step 1) Item ""_____" (myname)": Response code 400 (Bad Request)
    Anything I can do to debug this
    s
    • 2
    • 1
  • b

    big-cpu-76306

    09/02/2022, 10:27 PM
    hi! does @plasmohq/storage support unlimitedStorage or does it cap at the ~5MB? I'm running into Error: QUOTA_BYTES_PER_ITEM quota exceeded but would love to use this storage option.
    s
    • 2
    • 1
  • q

    quiet-engine-70935

    09/02/2022, 10:27 PM
    @big-cpu-76306 has reached level 1. GG!
  • t

    thousands-horse-90118

    09/02/2022, 11:48 PM
    The plasmo build process appears to be omitting somethings that I'm putting into the manifest. I have a section in
    package.json
    that looks like this:
    Copy code
    "web_accessible_resources": [
        {
          "resources": ["_favicon/*"],
          "matches": [
            "http://localhost:3000/*",
            "https://*.mydomain.co/*",
            "https://mydomain.co/*"
          ]
        }
      ]
    However when I run
    dev
    or
    build
    the manifest that gets generated seems to overwrite the resources key with an empty array (
    {"resources": []}
    ) . One thing to note is that there are no files that match this path, in my bundler I'm generating those URLs at runtime the the
    chrome.runtime.getURL()
    call.
    s
    • 2
    • 1
  • q

    quiet-electrician-41149

    09/03/2022, 12:11 AM
    Hmmm, anyone see anything glaringly wrong with my CI action?
    s
    • 2
    • 5
  • q

    quiet-electrician-41149

    09/03/2022, 1:56 AM
    BTW what would trigger the need for the
    tabs
    permission? Is it because I have
    newtab.tsx
    ? I don't think you need the
    tabs
    permission to replace the new tab. In fact the
    tabs
    permission adds the message
    Read your browsing history
    which makes my app sound pretty sus
    s
    • 2
    • 1
  • q

    quiet-electrician-41149

    09/05/2022, 7:21 PM
    BTW making good progress on my chrome extension (DM me if you wanna check it out, early early BETA). The only two issues left I have with Plasmo is the one above (
    tabs
    permission requested when my app doesn't use it) and google tag manager not working
    s
    • 2
    • 1
  • m

    most-florist-42787

    09/14/2022, 3:41 PM
    I am new to Plasmo. I want to create an Extension that detects the loading of an youtube ad. I've started with a content script but it does not print on the console when loaded. Am I missing something?
    s
    • 2
    • 1
  • b

    busy-greece-52941

    09/15/2022, 2:19 PM
    I'm getting this error on a localhost:3000 server, from the content-script. Any tips?
    s
    • 2
    • 1
  • q

    quiet-engine-70935

    09/15/2022, 2:19 PM
    @busy-greece-52941 has reached level 4. GG!
  • m

    most-florist-42787

    09/16/2022, 5:52 AM
    I need to get the url that the user is redirected to, when clicking on this button. The problem is, that it's not found in the html code. The button opens a popup. Any way to get this link?
    s
    • 2
    • 1
  • w

    wonderful-jewelry-41731

    09/16/2022, 8:05 AM
    Hello, I want to use "closed" shadow dom, is there a way to achieve this with plasmo?
    s
    • 2
    • 1
  • m

    most-florist-42787

    09/16/2022, 10:00 AM
    Is it possible to get the response data of a POST request made by the website?
    s
    • 2
    • 1
  • q

    quaint-rainbow-21282

    09/16/2022, 12:38 PM
    import script causes content script to not run
    s
    • 2
    • 5
  • q

    quaint-rainbow-21282

    09/16/2022, 12:41 PM
    npm with-tailwindcss doesn't work
    s
    • 2
    • 6
  • d

    delightful-grass-89815

    09/17/2022, 7:11 AM
    There's a way to change the extension icon when an event occurs?
    s
    • 2
    • 1
  • q

    quaint-rainbow-21282

    09/17/2022, 10:18 AM
    How do I add permissions
    s
    • 2
    • 3
  • b

    busy-greece-52941

    09/18/2022, 1:50 PM
    hey @limited-farmer-52140 where is the devtools.tsx code actually used?
    s
    l
    • 3
    • 18
  • q

    quiet-electrician-41149

    09/19/2022, 4:04 AM
    Is there a debounce on the
    @plasmohq/storage
    library? I noticed that some of the time the writes to the storage arent going through
    s
    l
    q
    • 4
    • 9
  • a

    ambitious-restaurant-41333

    09/21/2022, 6:50 PM
    When I try to do
    Copy code
    shell
    pnpm dlx plasmo init
    I get
    Copy code
    WARN  The package linked to "..\..\..\Users\avi12\AppData\Local\pnpm\store\v3\tmp\dlx-41756\node_modules\.pnpm\@parcel+watcher@2.0.5\node_modules\@parcel\watcher" had files with invalid names: ...  They were renamed.
    
     ENOENT  ENOENT: no such file or directory, copyfile 'C:\Users\avi12\AppData\Local\pnpm\store\v3\files\a5\f0f964db2a4ce7565c73cc56b239fd42519521e6e6daaf746531883b9e89af9724747deff0e577d77702f98be70f153ad21684197d2cd3f3c01193c37844a0
    ' -> 'C:\Users\avi12\AppData\Local\pnpm\store\v3\tmp\dlx-41756\node_modules\.pnpm\@parcel+watcher@2.0.5\node_modules\@parcel\_tmp_41756_49360b514f6cd3363d7ade7ab63d6ca0\node_modules.binnode-gyp-build-test'
    s
    • 2
    • 1
  • a

    ambitious-restaurant-41333

    09/23/2022, 11:17 AM
    How do I use Svelte in a content script?
    s
    • 2
    • 1
  • a

    ambitious-restaurant-41333

    09/24/2022, 10:22 AM
    Apparently
    @plasmohq/storage
    is React-specific
    s
    • 2
    • 1
123Latest