From ecbceeb9ca463626834a44b8bb7807711460065e Mon Sep 17 00:00:00 2001 From: Ekin Koc Date: Thu, 13 Oct 2016 13:33:20 +0300 Subject: [PATCH] Add node shebang to single JS builds (#915) --- scripts/build-webpack.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/build-webpack.js b/scripts/build-webpack.js index b18f9dbd93..47e4b92087 100755 --- a/scripts/build-webpack.js +++ b/scripts/build-webpack.js @@ -27,6 +27,12 @@ const compiler = webpack({ loader: 'json', }], }, + plugins: [ + new webpack.BannerPlugin({ + banner: "#!/usr/bin/env node", + raw: true + }) + ], output: { filename: `yarn-${version}.js`, path: path.join(basedir, 'dist'), @@ -58,6 +64,12 @@ const compilerLegacy = webpack({ loader: 'json', }], }, + plugins: [ + new webpack.BannerPlugin({ + banner: "#!/usr/bin/env node", + raw: true + }) + ], output: { filename: `yarn-legacy-${version}.js`, path: path.join(basedir, 'dist'),