Skip to content

Commit

Permalink
Added webpack-node-externals plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnielsen committed May 3, 2019
1 parent a67e72c commit 70c9512
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
"tslint-config-airbnb": "^5.11.1",
"typescript": "^3.2.4",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.1"
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.2.1",
"webpack-node-externals": "^1.7.2"
},
"dependencies": {
"@al/client": "^1.0.0-beta.1",
Expand Down
10 changes: 3 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const PeerDepsExternalsPlugin = require('peer-deps-externals-webpack-plugin');
const nodeExternals = require('webpack-node-externals');

module.exports = (env) => {

Expand All @@ -8,19 +8,15 @@ module.exports = (env) => {
entry: {
'index': path.resolve(__dirname, './dist/commonjs/index.js')
},
externals: [
'@al/client', '@al/session', '@al/haversack'
],
externals: [nodeExternals()],
output: {
path: path.resolve(__dirname, './dist/umd'),
filename: '[name].js',
library: 'aimsClient',
libraryTarget: 'umd', // supports commonjs, amd and web browsers
globalObject: 'this'
},
plugins: [
new PeerDepsExternalsPlugin()
]
plugins: []
};

};

0 comments on commit 70c9512

Please sign in to comment.