mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
23 lines
465 B
JavaScript
23 lines
465 B
JavaScript
import { build } from 'esbuild';
|
|||
|
|
import { rmSync } from 'fs';
|
||
|
|
|
||
|
|
console.log('Removing dist...');
|
||
|
|
rmSync('dist', { recursive: true, force: true });
|
||
|
|
|
||
|
|
console.log('Creating context...');
|
||
|
|
build({
|
||
|
|
entryPoints: ['src/index.ts'],
|
||
|
|
outfile: 'dist/index.cjs',
|
||
|
|
|
||
|
|
platform: 'node',
|
||
|
|
loader: {
|
||
|
|
'.node': 'copy',
|
||
|
|
'.ttf': 'file',
|
||
|
|
},
|
||
|
|
|
||
|
|
bundle: true,
|
||
|
|
sourcemap: true,
|
||
|
|
minifyIdentifiers: false, // causes errors
|
||
|
|
minifySyntax: true,
|
||
|
|
minifyWhitespace: true,
|
||
|
|
});
|