Fix running on older nodejs versions

The shebang does not work without extension
This commit is contained in:
Marko Korhonen 2023-11-23 20:24:35 +02:00
parent 536aaa01b0
commit 6bbfd25745
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
5 changed files with 8 additions and 13 deletions

View file

@ -1,15 +1,14 @@
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import shebang from 'rollup-plugin-add-shebang';
/** @type {import('rollup').RollupOptions} */
const config = {
input: 'src/main.ts',
output: {
format: 'esm',
file: 'dist/wtc',
file: 'dist/wtc.js',
},
plugins: [typescript(), terser(), shebang({ include: 'dist/wtc' })],
plugins: [typescript(), terser()],
external: [
'@iarna/toml',
'chalk',