Skip to content

Commit

Permalink
chore: reduce bundle - remove externals
Browse files Browse the repository at this point in the history
  • Loading branch information
moshfeu committed Sep 18, 2020
1 parent 6472dcb commit 8e1fa85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-wiz",
"version": "1.1.2",
"version": "1.1.3",
"author": {
"email": "[email protected]",
"name": "Mosh Feu",
Expand Down Expand Up @@ -31,6 +31,7 @@
"@types/inquirer": "^7.3.1",
"json-loader": "^0.5.7",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
"webpack-cli": "^3.3.12",
"webpack-node-externals": "^2.5.2"
}
}
8 changes: 5 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');

module.exports = {
entry: './src/index.ts',
Expand All @@ -14,13 +15,14 @@ module.exports = {
],
},
resolve: {
extensions: [ '.ts', '.js' ],
extensions: ['.ts', '.js'],
},
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'bin'),
},
externals: [nodeExternals()],
plugins: [
new webpack.BannerPlugin({ banner: "#!/usr/bin/env node", raw: true }),
]
new webpack.BannerPlugin({ banner: '#!/usr/bin/env node', raw: true }),
],
};

0 comments on commit 8e1fa85

Please sign in to comment.