mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
21 lines
425 B
JavaScript
21 lines
425 B
JavaScript
import { build } from 'esbuild'
|
|
import { pull } from 'lodash-es'
|
|
|
|
import packageJson from './package.json' with { type: 'json' }
|
|
|
|
await build({
|
|
entryPoints: ['./dist/index.js'],
|
|
outfile: './dist/index.cjs',
|
|
bundle: true,
|
|
format: 'cjs',
|
|
platform: 'node',
|
|
external: pull(
|
|
Object.keys(packageJson.dependencies),
|
|
'@octokit/rest',
|
|
'lodash-es',
|
|
),
|
|
define: {
|
|
'import.meta.url': '__filename',
|
|
},
|
|
})
|