Giter VIP home page Giter VIP logo

Comments (5)

nicodes avatar nicodes commented on July 18, 2024 5

Found my issue, needed to include <VitePwaManifest /> in app.vue. I think we should add this step to the docs. Full example below:

<template>
  <div>
    <VitePwaManifest />
    <NuxtWelcome />
  </div>
</template>

from nuxt.

TomSmith27 avatar TomSmith27 commented on July 18, 2024 2

I think this section could be made for obvious as i also completely missed this

from nuxt.

userquin avatar userquin commented on July 18, 2024

https://vite-pwa-org.netlify.app/frameworks/nuxt.html#registering-web-manifest

from nuxt.

danieldanielecki avatar danieldanielecki commented on July 18, 2024

If it's solved, then @nicodes please close this issue.

from nuxt.

baxibaba avatar baxibaba commented on July 18, 2024

export default defineNuxtConfig({
runtimeConfig: {
public: envData,
},
router: {
mode: "history",
},
buildModules: [
"@nuxtjs/composition-api/module",
["@pinia/nuxt", { disableVuex: false }],
"@nuxtjs/tailwindcss",
],
modules: [
"@vite-pwa/nuxt",
"@element-plus/nuxt",
"@pinia/nuxt",
"@pinia-plugin-persistedstate/nuxt",
],
pwa: {
registerType: "autoUpdate",
manifest: {
name: "D",
short_name: "D",
theme_color: "#ffffff",
icons: [
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any maskable",
},
],
},
workbox: {
globPatterns: ["**/*.{js,css,html,png,svg,ico}"],
},
client: {
installPrompt: true,
periodicSyncForUpdates: 20,
},
devOptions: {
enabled: true,
suppressWarnings: true,
navigateFallbackAllowlist: [/^/$/],
type: "module",
},
},
plugins: [
// { src: '@/plugins/service-worker.ts', mode: 'client' }
// '/plugins/dict',
// '
/router.js'
// { src: '~/plugins/router.plugin.ts', mode: 'client' },
],
pinia: {
autoImports: [
// automatically imports defineStore
"defineStore", // import { defineStore } from 'pinia'
["defineStore", "definePiniaStore"], // import { defineStore as definePiniaStore } from 'pinia'
],
},
build: {
transpile: ["/^element-plus/", "vue-i18n"],
extractCSS: { allChunks: true },
}

Production environments do not see pwa downloads,How to configure?

from nuxt.

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.