fix(linux): 修复linux中,require的路径错误
This commit is contained in:
1 parent
db4cf015c2
commit
0816fafc02
1 file changed
+7
-2
+7
-2
@@ -95,8 +95,13 @@ let keyService: any
|
|||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
keyService = new KeyServiceMac()
|
keyService = new KeyServiceMac()
|
||||||
} else if (process.platform === 'linux') {
|
} else if (process.platform === 'linux') {
|
||||||
const { KeyServiceLinux } = require('./services/keyServiceLinux')
|
// const { KeyServiceLinux } = require('./services/keyServiceLinux')
|
||||||
keyService = new KeyServiceLinux()
|
// keyService = new KeyServiceLinux()
|
||||||
|
|
||||||
|
import('./services/keyServiceLinux').then(({ KeyServiceLinux }) => {
|
||||||
|
keyService = new KeyServiceLinux();
|
||||||
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
keyService = new KeyService()
|
keyService = new KeyService()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user