Git Product home page Git Product logo

Comments (1)

DuCanhGH avatar DuCanhGH commented on May 20, 2024 1

It would be awesome to have a version of Serwist that works with turbopack.

I agree! However, it seems to be not really feasible at the moment.

Since Turbopack isn't configurable through plugins yet, our only options to provide rudimentary support for Turbopack would be to either introduce a post-build script that the user runs manually, which would only work for next build --turbo (which doesn't seem to be a thing yet?) and would be really limited, for we are not able to access things the likes of webpack config, fully resolved Next.js config, etc., or write a Turbopack loader as suggested, but I'm not really sure as to when this loader is run.

If it is run after the build script is done with static files such as ".next/static/chunks/**/*.js", which seems to be unlikely, then we can make it work. Otherwise, we may as well just wait for Turbopack's plugin support.

At the moment though, since next build --turbo seemingly isn't supported yet, I believe using the normal @serwist/next should just work and Turbopack support needn't already be a priority yet. This is because most simple use cases don't really need having a service worker in development mode. However, if one's use case is more complex, perhaps their only choice is to temporarily make do with webpack or not use Serwist.

I hope you understand the situation...

from serwist.

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.