Preserve hashbang and make output file executable.
npm install rollup-plugin-hashbang 
``bash`
npm i rollup-plugin-hashbang -D
With rollup.config.js:
`js
import hashbang from "rollup-plugin-hashbang";
export default {
plugins: [hashbang()],
};
`
In:
`js
#!/usr/bin/env node
console.log("hi");
`
Output:
`js
#!/usr/bin/env node
"use strict";
console.log("hi");
`
Hashbang is preserved and the output file will be executable you don't need to chmod +x FILE to run it.
1. Fork it!
2. Create your feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request :D
rollup-plugin-hashbang © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).
> egoist.moe · GitHub @EGOIST · Twitter @\_egoistlily