From 6b4413f829701812fdf182311ed2bb8a2523631e Mon Sep 17 00:00:00 2001 From: Zhi Date: Sat, 26 Jan 2019 14:31:41 +0800 Subject: [PATCH] chore: fix export issue generate by webpack upgrading --- build/deploy-faas.sh | 2 +- build/webpack.common.js | 2 ++ build/webpack.conf.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build/deploy-faas.sh b/build/deploy-faas.sh index ed6e892c4..0540c338b 100644 --- a/build/deploy-faas.sh +++ b/build/deploy-faas.sh @@ -5,7 +5,7 @@ cd temp_web git clone --depth 1 -b gh-pages --single-branch https://github.com/ElemeFE/element.git && cd element # build sub folder -SUB_FOLDER='2.4' +SUB_FOLDER='2.5' mkdir $SUB_FOLDER rm -rf *.js *.css *.map static rm -rf $SUB_FOLDER/** diff --git a/build/webpack.common.js b/build/webpack.common.js index 6357fb78c..abd862516 100644 --- a/build/webpack.common.js +++ b/build/webpack.common.js @@ -14,6 +14,8 @@ module.exports = { publicPath: '/dist/', filename: 'element-ui.common.js', chunkFilename: '[id].js', + libraryExport: 'default', + library: 'ELEMENT', libraryTarget: 'commonjs2' }, resolve: { diff --git a/build/webpack.conf.js b/build/webpack.conf.js index 65fbdfa23..0ccd5fbaf 100644 --- a/build/webpack.conf.js +++ b/build/webpack.conf.js @@ -15,6 +15,7 @@ module.exports = { filename: 'index.js', chunkFilename: '[id].js', libraryTarget: 'umd', + libraryExport: 'default', library: 'ELEMENT', umdNamedDefine: true },