From 5f346f04de18356b4b61352cfe508df027c4d894 Mon Sep 17 00:00:00 2001 From: island205 Date: Mon, 28 Jan 2019 14:57:22 +0800 Subject: [PATCH] Build: Fix UMD bundle error used in node env Webpack UMD modules are broken currently: [webpack/webpack#6525](https://github.com/webpack/webpack/issues/6525) --- build/webpack.conf.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/webpack.conf.js b/build/webpack.conf.js index 24c7c562e..1f618584e 100644 --- a/build/webpack.conf.js +++ b/build/webpack.conf.js @@ -18,7 +18,8 @@ module.exports = { libraryTarget: 'umd', libraryExport: 'default', library: 'ELEMENT', - umdNamedDefine: true + umdNamedDefine: true, + globalObject: 'typeof self !== \'undefined\' ? self : this' }, resolve: { extensions: ['.js', '.vue', '.json'],