
For reasons I’ll explain elsewhere, I’m building a desktop app, which stores its data locally. It’s built using Electron, a toolkit for writing desktop apps using web technologies. and it uses a pure-JavaScript database called NeDB for persistence. Pretty quickly, I ran into a headscratcher of a problem. My data wasn’t actually being saved to a file but I wasn’t getting any errors or warnings.
As it turned out, it wasn’t a bug, but a complex situation involving Webpack defaults. Understanding and solving this issue took me waaaaaaay down a rabbit hole, and I thought it would be informative to share the story.
Continue reading “An epic Webpack mystery”