From d0b245f6c32d73d13528e133ea315f220349b56f Mon Sep 17 00:00:00 2001 From: liuyao <670652018@qq.com> Date: Sun, 30 Sep 2018 19:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96html=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.dev.conf.js | 4 +++- build/webpack.prod.conf.js | 4 +++- index.html | 2 +- package.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js index 43901e5b..d27d8a04 100644 --- a/build/webpack.dev.conf.js +++ b/build/webpack.dev.conf.js @@ -56,7 +56,9 @@ const devWebpackConfig = merge(baseWebpackConfig, { inject: true, favicon: resolve('favicon.ico'), title: 'vue-element-admin', - path: config.dev.assetsPublicPath + config.dev.assetsSubDirectory + templateParameters: { + BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory, + }, }), ] }) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 7f710543..05cbcf4e 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -69,7 +69,9 @@ const webpackConfig = merge(baseWebpackConfig, { inject: true, favicon: resolve('favicon.ico'), title: 'vue-element-admin', - path: config.build.assetsPublicPath + config.build.assetsSubDirectory, + templateParameters: { + BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory, + }, minify: { removeComments: true, collapseWhitespace: true, diff --git a/index.html b/index.html index 730d16a6..633f4dd1 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ vue-element-admin - +
diff --git a/package.json b/package.json index 9fb63d92..361c9410 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "extract-text-webpack-plugin": "3.0.2", "file-loader": "1.1.5", "friendly-errors-webpack-plugin": "1.6.1", - "html-webpack-plugin": "2.30.1", + "html-webpack-plugin": "^3.2.0", "node-notifier": "5.1.2", "node-sass": "^4.7.2", "optimize-css-assets-webpack-plugin": "3.2.0",