27 lines
497 B
JavaScript
27 lines
497 B
JavaScript
// @ts-check
|
|
// https://bun.sh/docs/bundler
|
|
// @ts-ignore
|
|
import pkg from './package.json';
|
|
// bun run src/index.ts --
|
|
await Bun.build({
|
|
target: 'node',
|
|
format: 'esm',
|
|
entrypoints: ['./src/index.ts'],
|
|
outdir: './dist',
|
|
naming: {
|
|
entry: 'dts.mjs',
|
|
},
|
|
external: [
|
|
'rollup', //
|
|
'rollup-plugin-dts',
|
|
'@rollup/plugin-typescript',
|
|
'@rollup/plugin-commonjs',
|
|
'@rollup/plugin-node-resolve',
|
|
//
|
|
],
|
|
|
|
define: {
|
|
VERSION: JSON.stringify(pkg.version),
|
|
},
|
|
});
|