Using Capacitor in PWA without compiler

#1

I’m writing a PWA for use by staff that needs to work offline. I’m trying to use Capacitor and in particular, Filesystem to store a .txt file. This will run on a tablet.
I can’t find any documentation or samples of using Filesystem using purely js without a compiler to import files.
I’ve written this code all by hand and am building it as a PWA with a manifest etc.

I’m including the capacitor js like so…

Any tips on getting this implemented would be appreciated. Is this even possible?

Currently, I can save a Blob as a .txt file but that doesn’t save to the device.

0 Likes