Mik*_*iuk 5 javascript ios vue.js progressive-web-apps nuxt.js
我试图在 nuxt.js 中使用 PWA 模块,到目前为止,我在下面这个地址的 firebase 服务器上启动了 nuxt 应用程序。
https://quasar-d56d0.firebaseapp.com/
在 chrome for android、windows 和 mac 上运行良好,但在 iOS 上不起作用,对于 safari 对任何设备都不起作用。
下面是我的 nuxt.config.js。
同样,我想问一下,是否有任何选项可以让自定义弹出窗口要求用户下载 nuxt 应用程序,作为渐进式网络应用程序,而不是在 chrome 中使用它?
export default {
mode: 'spa',
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
],
/*
** Plugins to load before mounting the App
*/
plugins: [
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/pwa',
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
}
},
/*
** Overwrite's generated manifest values
*/
manifest: {
name: 'Nuxt.js PWA',
short_name: 'Nuxt.js PWA',
lang: 'en',
display: 'standalone',
},
pwa: {
meta: {
mobileAppIOS: true
}
}
}
Run Code Online (Sandbox Code Playgroud)