[英]How to use Google Workbox with Next.js?
I have an Next.js app that's currently using sw-precache and sw-precache-webpack-plugin to generate a service worker. 我有一个Next.js应用程序,当前正在使用sw-precache和sw-precache-webpack-plugin生成服务工作者。
I would like to migrate to use Google Workbox and workbox-webpack-plugin instead. 我想迁移使用Google Workbox和workbox-webpack-plugin。 Has anyone successfully done that in a Next.js context?
有没有人在Next.js上下文中成功完成此操作?
Someone creates this plugin, could be better(because I will need to fork it to include my css in the cache), but is fine for this. 有人创建了这个插件,可能会更好(因为我需要派生它以便将我的css包括在缓存中),但是这样做很好。 https://www.npmjs.com/package/next-workbox-webpack-plugin
https://www.npmjs.com/package/next-workbox-webpack-plugin
next-offline seems to be the standard here. 下一个脱机似乎是这里的标准。 It "just works".
它“有效”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.