Quasar CLI with Webpack - @quasar/app-webpack
PWA 客户端接管的 SSR
使用 Quasar CLI,你可以使用 SSR + PWA 的杀手级组合构建你的应用。为了启用 PWA 的 SSR 构建,你需要先编辑 /quasar.config
文件:
¥With Quasar CLI you can build your app with the killer combo of SSR + PWA. In order to enable PWA for SSR builds, you need to edit your /quasar.config
file first:
return {
// ...
ssr: {
pwa: true
}
}
content_paste
新客户端的第一个请求将由 Web 服务器提供(因此 SSR 提供初始页面内容)。PWA 安装后会在客户端接管。所有后续请求都将从缓存中获取(除非你通过自定义配置进行更改)。
¥The first request of a new client will be served from the webserver (so SSR supplies the initial page content). The PWA gets installed then it takes over on client side. All further requests will be served from cache (unless you have some custom configuration to change that).
有关 PWA 的更多信息,请前往 PWA 简介 并阅读完整的 PWA 指南部分。
¥For more information on PWA, head on to PWA Introduction and read the whole PWA Guide section.