msnodesql as optional dependency

This commit is contained in:
Jan Prochazka 2021-01-16 21:54:01 +01:00
parent d1aef572bd
commit ccd9a0fa70
2 changed files with 11 additions and 3 deletions

View File

@ -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"
}
}

View File

@ -1,3 +1,9 @@
const msnodesqlv8 = () => require('msnodesqlv8');
module.exports = { msnodesqlv8 };
const win32Modules = {
msnodesqlv8,
};
module.exports = {
...(process.platform == 'win32' ? win32Modules : {}),
};