Răsfoiți Sursa

chore: fix export issue generate by webpack upgrading

Zhi 6 ani în urmă
părinte
comite
6b4413f829
3 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 1 1
      build/deploy-faas.sh
  2. 2 0
      build/webpack.common.js
  3. 1 0
      build/webpack.conf.js

+ 1 - 1
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/**

+ 2 - 0
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: {

+ 1 - 0
build/webpack.conf.js

@@ -15,6 +15,7 @@ module.exports = {
     filename: 'index.js',
     chunkFilename: '[id].js',
     libraryTarget: 'umd',
+    libraryExport: 'default',
     library: 'ELEMENT',
     umdNamedDefine: true
   },