napi-rs/cli/esbuild.mjs

13 lines
288 B
JavaScript
Raw Permalink Normal View History

import * as esbuild from 'esbuild'
await esbuild.build({
entryPoints: ['./dist/index.js'],
outfile: './dist/index.cjs',
bundle: true,
platform: 'node',
external: ['@napi-rs/lzma', '@napi-rs/tar', '@napi-rs/wasm-tools'],
define: {
'import.meta.url': '__filename',
},
})