From d5ba74d93b9dcedd653a2942aec109d47e388551 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Fri, 18 May 2018 16:00:26 -0700 Subject: [PATCH] fix: Fix UMD build for node Prevents webpack from referencing `window` in the UMD build which was causing an error in node. --- webpack.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 18d6a1b..6da1261 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,9 @@ module.exports = { path: path.resolve(__dirname, 'dist'), libraryTarget: 'umd', library: 'feather', + // Prevents webpack from referencing `window` in the UMD build + // Source: https://git.io/vppgU + globalObject: 'typeof self !== \'undefined\' ? self : this', }, devtool: 'source-map', module: {