mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
chore: external all dependencies in cli cjs build (#2166)
This commit is contained in:
parent
286c8d0cf4
commit
a7ef9be9ca
@ -1,11 +1,14 @@
|
||||
import * as esbuild from 'esbuild'
|
||||
|
||||
import packageJson from './package.json' assert { type: 'json' }
|
||||
|
||||
await esbuild.build({
|
||||
entryPoints: ['./dist/index.js'],
|
||||
outfile: './dist/index.cjs',
|
||||
bundle: true,
|
||||
format: 'cjs',
|
||||
platform: 'node',
|
||||
external: ['@napi-rs/lzma', '@napi-rs/tar', '@napi-rs/wasm-tools'],
|
||||
external: Object.keys(packageJson.dependencies),
|
||||
define: {
|
||||
'import.meta.url': '__filename',
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user