You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nuxt project's goal is providing best PWA practices out-of-the box to users without need to complex project config and extra maintenance. Several attempts are already made to take such approach. We have two options for this, making nuxt.js a fully optioned framework which implements one solution for each part, this has advantage of easier first implementation, but also as a disadvantage that we need to force users only use what provided to them. To resolve this problem we have introduced modules, modules are basically enhancer functions which can access and modify almost all of nuxt internal configurations and optionally generate files using lodash templates. They are published as npm packages so community can help us to grow & have many more integrations. Another point is that easier usage that every functionality can be added by just adding module to config file.
Current PWA State
As one of first attempts we have created a PWA template nuxt-starter-pwa (not working now). (Modules were not available so i was using a wrapper function to emulate that in nuxt config). Then we integrated modules system right into nuxt core and ported modules to this system.
Nuxt is already providing best practices to optimize projects out-of-the-box such as minification, code splitting and gzip support. However we may provide more optional optimizations to users like cssnano and webpack-lodash-plugin. We have to convert this module into a preset (~meta module) to have better maintenance of different modules.
What's the difference? Should we use both sw and wb ? :D
HTTP2 & Push
Appropriate prefetch and preload links added to header of page thanks to vue-loader and client-manifest.json.
We have a partial header parser which extracts preload links and adds HTTP2 Link headers (This is a workaround for web-servers like nginx that don't support push but only HTTP2)
PRPL
We have SSR and inlined critical path CSS thanks to vue-loader :))
Preface
Nuxt project's goal is providing best PWA practices out-of-the box to users without need to complex project config and extra maintenance. Several attempts are already made to take such approach. We have two options for this, making nuxt.js a fully optioned framework which implements one solution for each part, this has advantage of easier first implementation, but also as a disadvantage that we need to force users only use what provided to them. To resolve this problem we have introduced modules, modules are basically enhancer functions which can access and modify almost all of nuxt internal configurations and optionally generate files using lodash templates. They are published as npm packages so community can help us to grow & have many more integrations. Another point is that easier usage that every functionality can be added by just adding module to config file.
Current PWA State
As one of first attempts we have created a PWA template nuxt-starter-pwa (not working now). (Modules were not available so i was using a wrapper function to emulate that in nuxt config). Then we integrated modules system right into nuxt core and ported modules to this system.
Manifest
This module helps automatically generate
manifest.json
file for projects so easier and without any pain.Optimize
Nuxt is already providing best practices to optimize projects out-of-the-box such as minification, code splitting and gzip support. However we may provide more optional optimizations to users like
cssnano
andwebpack-lodash-plugin
. We have to convert this module into apreset
(~meta module) to have better maintenance of different modules.Offline
This is our most challenging and not yet complete part. Many options are available for service workers:
sw-*
(?)sw
andwb
? :DHTTP2 & Push
prefetch
andpreload
links added to header of page thanks tovue-loader
andclient-manifest.json
.preload
links and adds HTTP2 Link headers (This is a workaround for web-servers like nginx that don't support push but only HTTP2)PRPL
We have SSR and inlined critical path CSS thanks to vue-loader :))
/cc @addyosmani @Atinux @alexchopin
The text was updated successfully, but these errors were encountered: