So i am trying to make my payload app pwa. So as far as i know i have to do some modification from public folders manifest.json file. But in payload application we don't have that. But from ai help i got to know about adding public folder.
but it is not working as expected. if we check the browser application tab we can see that it is not getting the manifest.json file.
What are you trying to achieve with payload app as pwa?
AFAIK I haven't seen anyone do this before (then again I don't see many pwas these days) so you're treading pretty unknown grounds
yeah. that's true. but it is possible right ? i mean making it pwa.
So this application is being served as front end as well. i am using custom routes and components so that's why it will be a webapp for the users and for flexibility i am trying to make it pwa.
I'm not super familiar with building PWAs, but I imagine you may need to modify the
index.html
file that's served after building to include a link to the
manifest.json
file.
Yeah it's possible, you will want to modify the webpack configuration, and by default Payload doesn't serve any
public
folder
for the latter you wanna update the build step of copyfiles
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/",
you see its copying all those file extensions, add one for your .json or simply create a new step to copy a whole folder into dist too
I don't think you need to modify the webpack config actually
Are you trying to make an offline application?
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.