napi-rs/cli/esbuild.mjs
LongYinan 98cb7671d3
feat(napi): impl ReadableStream and AsyncGenerator (#2418)
* feat(napi): impl ReadableStream and AsyncGenerator

* clippy fix

* Into<Vec<u8>> trait

* Skip node18 stream test due to Node.js bug

* Cleanup

* Also skip wasi test

* Merge test

* Skip wasi

* Useless expect-error
2025-01-03 17:09:42 +08:00

17 lines
407 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',
},
})