UNPKG

webpack-shebang-plugin

Version:

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.

4 lines 186 B
module.exports = function (source) { const reg = new RegExp(this.query && this.query.shebangRegExp || /[\s\n\r]*(#!.*)[\s\n\r]*/gm); return source.toString().replace(reg, ''); };