I’m running an admin panel on localhost using webpack.
I’m trying to save a bunch of objects into a json file in the same directory using fs
which doesn’t work.
The error I receive: Node cannot find module "fs"
I understand that ‘fs’ belongs to NodeJS environement which webpack can’t really use, so my question is whether there’s another alternative to reading/writing json files with webpack.
Thanks!
does one of this answer your question: Node cannot find module “fs” when using webpack or Can’t resolve ‘fs’ when bundle with webpack