Skip to content

Commit ec78a1d

Browse files
chore: preserve cli shebang banner
1 parent 9b7a725 commit ec78a1d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

webpack.config.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,14 @@ module.exports = {
5252
],
5353
},
5454
externals: [nodeExternals()],
55+
plugins: [
56+
// This is necessary to make the CLI executable. We originally have this
57+
// in src/cli.ts but it gets erased during the bundling process.
58+
new webpack.BannerPlugin({
59+
banner: "#!/usr/bin/env node",
60+
raw: true,
61+
entryOnly: true,
62+
include: "cli",
63+
}),
64+
],
5565
};

0 commit comments

Comments
 (0)