main
 1import { build } from 'esbuild';
 2import { promises as fs } from 'fs';
 3
 4await build({
 5    entryPoints: ['src/main.ts'],
 6    bundle: true,
 7    external:[
 8        'hexo-util',
 9        'hexo'
10    ],
11    outdir: 'dist',
12    platform: 'node',
13    sourcemap: false,
14    tsconfig: 'tsconfig.json',
15});
16await fs.copyFile('src/index.js', 'dist/index.js');