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 @@ + + + + + + +
+ + + + + + +