imin
September 26, 2022, 2:25am
1
I’m using the latest ionic 6, and per the documentation at Vue PWA | Add Progressive Web Apps to Vue.js Projects | Ionic , it says running the command vue add pwa
would also generate a manifest. But I don’t see any manifest
file generated after running the command.
So do I need to generate the manifest file manually? What should be the filename of the manifest file, and where should it be placed?
I have had some trouble with that also. Does it create a manifest file if you do a production build?
ionic build —prod
If you want to try out vite, see my pwa instructions in this repo: GitHub - dolthead/vitehow: Vite-based Ionic Tabs Vue Starter
1 Like
imin
September 26, 2022, 3:09am
3
Thanks for your reply, but even after running ionic build —prod
, no manifest file was created.
So I would check your package dependencies. I just started a new project, added the pwa plugin, and the manifest was generated in the dist directory. Can you share the package.json?
imin
September 27, 2022, 1:22am
5
Here’s my package.json
{
"name": "k-3-sayangan",
"version": "0.0.1",
"private": true,
"description": "An Ionic project",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@capacitor/app": "4.0.1",
"@capacitor/core": "4.2.0",
"@capacitor/haptics": "4.0.1",
"@capacitor/keyboard": "4.0.1",
"@capacitor/status-bar": "4.0.1",
"@ionic/vue": "^6.0.0",
"@ionic/vue-router": "^6.0.0",
"core-js": "^3.6.5",
"ionicons": "^6.0.3",
"register-service-worker": "^1.7.1",
"vue": "^3.2.21",
"vue-router": "^4.0.12"
},
"devDependencies": {
"@capacitor/cli": "4.2.0",
"@types/jest": "^27.0.2",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@vue/cli-plugin-babel": "~5.0.0-rc.1",
"@vue/cli-plugin-e2e-cypress": "~5.0.0-rc.1",
"@vue/cli-plugin-eslint": "~5.0.0-rc.1",
"@vue/cli-plugin-pwa": "~4.5.15",
"@vue/cli-plugin-router": "~5.0.0-rc.1",
"@vue/cli-plugin-typescript": "~5.0.0-rc.1",
"@vue/cli-plugin-unit-jest": "~5.0.0-rc.1",
"@vue/cli-service": "~5.0.0-rc.1",
"@vue/eslint-config-typescript": "^9.1.0",
"@vue/test-utils": "^2.0.0-rc.16",
"@vue/vue3-jest": "^27.0.0-alpha.3",
"babel-jest": "^27.3.1",
"cypress": "^8.7.0",
"eslint": "^8.4.1",
"eslint-plugin-vue": "^8.2.0",
"jest": "^27.3.1",
"ts-jest": "^27.0.7",
"typescript": "^4.3.5"
}
}
mirko77
October 10, 2022, 12:03pm
6
Same here.
Have a look at @vue/cli-plugin-pwa | Vue CLI
You need to set the pwa options in vue.config.js
to generate the manifest.json
, otherwise, it is not generated.
I could be wrong though since I did it a while ago and the Vue guys change things every other day.
However, the manifest.json
goes inside the dist/ folder