From 70c95120f704614231295ae0d1f8b986c09df22e Mon Sep 17 00:00:00 2001 From: Kevin Nielsen Date: Thu, 2 May 2019 20:25:01 -0700 Subject: [PATCH] Added webpack-node-externals plugin. --- package.json | 4 +++- webpack.config.js | 10 +++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 92dc9df..8dac13c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/webpack.config.js b/webpack.config.js index ac72ae5..b9f6500 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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) => { @@ -8,9 +8,7 @@ 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', @@ -18,9 +16,7 @@ module.exports = (env) => { libraryTarget: 'umd', // supports commonjs, amd and web browsers globalObject: 'this' }, - plugins: [ - new PeerDepsExternalsPlugin() - ] + plugins: [] }; };