diff --git a/console-ui/build/copyFile.js b/console-ui/build/copyFile.js index c80d2b6efb5..f046df60770 100644 --- a/console-ui/build/copyFile.js +++ b/console-ui/build/copyFile.js @@ -27,7 +27,7 @@ const mkdir = dir => { } }; -const copyList = ['js/main.js', 'css/main.css']; +const copyList = ['js/main.js', 'css/main.css', 'index.html']; copyList.forEach(_fileName => { const srcFileName = path.join(srcDir, _fileName); diff --git a/console-ui/build/webpack.base.conf.js b/console-ui/build/webpack.base.conf.js index b097f8755e3..ffa8b0cd593 100644 --- a/console-ui/build/webpack.base.conf.js +++ b/console-ui/build/webpack.base.conf.js @@ -95,7 +95,11 @@ module.exports = { plugins: [ new HtmlWebpackPlugin({ filename: 'index.html', - template: './public/index.html', + template: './public/index.ejs', + templateParameters: { + contextPath: isDev ? './' : 'console-ui/public/' + }, + hash: true, minify: !isDev, }), new CopyWebpackPlugin([ diff --git a/console-ui/public/index.ejs b/console-ui/public/index.ejs new file mode 100644 index 00000000000..3874409c78a --- /dev/null +++ b/console-ui/public/index.ejs @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + Nacos + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/console-ui/public/index.html b/console-ui/public/index.html deleted file mode 100644 index 191c758f33f..00000000000 --- a/console-ui/public/index.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - Nacos - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - diff --git a/console/src/main/resources/static/index.html b/console/src/main/resources/static/index.html index 9b3ad868fb9..a55516b6796 100644 --- a/console/src/main/resources/static/index.html +++ b/console/src/main/resources/static/index.html @@ -22,20 +22,20 @@ + + + Nacos - - - - + + + - - - - - + + + + - - +
@@ -43,20 +43,19 @@
- - - - - - - - - - - - - + + + + + + + + + + + + - +