diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js index 5eba7eb3..26a5584a 100644 --- a/build/webpack.dev.conf.js +++ b/build/webpack.dev.conf.js @@ -58,8 +58,10 @@ 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 01f85732..946a134a 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -56,7 +56,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 489d1a53..7a7ecacf 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@