webpack-shebang-plugin
This is an all-in-one webpack plugin which prepends hashbangs automatically to the generated bundle files and make it executable -- all revived from your entry source file.
rollup-plugin-shebang-bin
Richly configurable rollup plugin for preserving or inserting shebang (hashbang) and making scripts executable.