mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
build(node): migrate from CommonJS to ESM modules
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import { join } from 'path'
|
||||
import * as url from 'url'
|
||||
|
||||
/**
|
||||
* bindings are not typed yet.
|
||||
* if the available function names are required they can be found inside of `../src/module.c`
|
||||
*/
|
||||
export const bindings: any = require('node-gyp-build')(join(__dirname, '../'))
|
||||
import build from 'node-gyp-build'
|
||||
export const bindings: any = build(
|
||||
join(url.fileURLToPath(new URL('.', import.meta.url)), '../')
|
||||
)
|
||||
|
||||
export default bindings
|
||||
|
||||
Reference in New Issue
Block a user