Code Monkey home page Code Monkey logo

Comments (6)

rzfzr avatar rzfzr commented on August 15, 2024 1

Very nice, thanks a lot!

from chrome-extension-tools.

rzfzr avatar rzfzr commented on August 15, 2024

Forgot to mention, before migrating to crxjs, I was using webpack, and that build system gave me a working version on both dev and release when importing the same module.

from chrome-extension-tools.

Toumash avatar Toumash commented on August 15, 2024

@rzfzr can i somehow reproduce your issue?
Which commit should i use?

Did you resolve it?

from chrome-extension-tools.

rzfzr avatar rzfzr commented on August 15, 2024

Greetings @Toumash,
I still have this as an issue, I just ran it from this commit to confirm it, steps to reproduce:

  1. Clone it
  2. npm i
  3. npm run build
  4. importing the extension as unpacked will give that error shown in the screenshot.

I am still investigating this, it seems to be something with the bundling step, when analysing the non-minified backgroud.ts, I can see that the 'client' variable is being declared later, it would be nice to import this package as is, I'm trying to define this import as commonjs by using '@rollup/plugin-commonjs' or 'vite-plugin-commonjs', but no luck yet.

Running the dev version will result in no error, where following the import gets the non-bundled/original version of the package.

Thanks

from chrome-extension-tools.

Toumash avatar Toumash commented on August 15, 2024

I've tried updating the config to the one i have in my project and the error is different - now it gives me the process i not defined.
Not sure if it helps, but you can see the code here: rzfzr/toboard-extension#5
I dont have any experience with the polyfills so i cannot really fix them easily - probably you know the solution as you added the node polyfills package already.
The alternative is to implement your own api client - its not super complex as it uses static api_key.
https://github.com/Toumash/daily-status/blob/master/DailyStatus.Common/Services/TogglReportApi.cs

You could generate a client with swagger codegen - they have a openapi file
https://engineering.toggl.com/docs/openapi
or import it into Postman and generate javascript code from there

from chrome-extension-tools.

Toumash avatar Toumash commented on August 15, 2024

wait! It works - i forgot that service workers needs more care like reinstall/reload ; D

from chrome-extension-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.