How to bundle the json files that lowdb
or node-json-db
depends on?
#27
-
Consider the following: {
"pkg": {
"assets": "./db.json",
"targets": ["node20-win-x64"],
"outputPath": "out"
}
} The Sorry for the weird question, but I do expect the The question is whether the bundled json file can be written through a module such as fs? I thought that after all files were bundled into |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@awdr74100 If you need to read/write a file you need to have it outside the bundle. The alternative is to bundle it inside the exe, check if it's present in a defined "storage" directory by your choice and if not copy it there so you can read/write it as you prefer |
Beta Was this translation helpful? Give feedback.
-
@robertsLando Thank you very much for your quick reply! So I can put It seems that most applications are designed in this way. The |
Beta Was this translation helpful? Give feedback.
@awdr74100 If you need to read/write a file you need to have it outside the bundle. The alternative is to bundle it inside the exe, check if it's present in a defined "storage" directory by your choice and if not copy it there so you can read/write it as you prefer