diff --git a/app/package.json b/app/package.json index cf40c7d7..1da239fe 100644 --- a/app/package.json +++ b/app/package.json @@ -6,8 +6,7 @@ "dependencies": { "electron-log": "^4.3.1", "electron-store": "^5.1.1", - "electron-updater": "^4.3.5", - "msnodesqlv8": "^2.0.10" + "electron-updater": "^4.3.5" }, "repository": { "type": "git", @@ -69,5 +68,8 @@ "cross-env": "^6.0.3", "electron": "11.1.1", "electron-builder": "22.9.1" + }, + "optionalDependencies": { + "msnodesqlv8": "^2.0.10" } } diff --git a/app/src/nativeModules.js b/app/src/nativeModules.js index c8916849..70b8dd16 100644 --- a/app/src/nativeModules.js +++ b/app/src/nativeModules.js @@ -1,3 +1,9 @@ const msnodesqlv8 = () => require('msnodesqlv8'); -module.exports = { msnodesqlv8 }; +const win32Modules = { + msnodesqlv8, +}; + +module.exports = { + ...(process.platform == 'win32' ? win32Modules : {}), +};