Native API not working in release build
kissmikki opened this issue · comments
Hi, I'm facing the following issue: the filesystem API is only working in development mode, not in release mode. Turns out that I cannot use any native API in release. I'm using Vue and TypeScript.
To narrow down the issue I reverted back to the sample template app (neutralinojs-vite-vue-ts-template) and created a release build from that to check if the message box is displayed correctly (that also uses native API). To my surprise, it doesn't work either.
I'm creating the release build with the following method:
- I'm running "yarn run build" from the frontend directory
- then I'm runnign "neu build" from the main directory
I get then in the dist folder all the necessary files. When running the app, it seems to be working. If I click the "count" button, the counter increases. But if I click the "message box" button, nothing happens. What am I doing wrong?
Anyone working on this issue
Hey, I am interested to work on this
Hey @kissmikki,
I tried the same thing and it didn't work at first
The solution is to modify the neutralino.config.json
file
"nativeAllowList": [
"app.*",
"os.*",
"debug.log",
"filesystem.*",
"window.*"
],
make sure to add filesystem.*
in the nativeAllowList
for it to work
It is working in the release build as well
Do let me know if the problem persists
@shalithasuranga Hey , I have checked this on my end and everything seems to work fine I think we can close this issue
Hello @Sadaf-A, thanks for testing and letting us know results, sure, we can close this. We can re-open or discuss if someone mentions about this issue again 🎉 Thanks