Add shebang to output file so a shell script is no longer needed
This commit is contained in:
parent
4b8c8be226
commit
cd891bf6a0
5 changed files with 48 additions and 7 deletions
|
@ -1,14 +1,15 @@
|
|||
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.js',
|
||||
file: 'dist/wtc',
|
||||
},
|
||||
plugins: [typescript(), terser()],
|
||||
plugins: [typescript(), terser(), shebang({ include: 'dist/wtc' })],
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue