diff --git a/nezha-fronted/build/webpack.prod.conf.js b/nezha-fronted/build/webpack.prod.conf.js index 5cc499295..069db8312 100644 --- a/nezha-fronted/build/webpack.prod.conf.js +++ b/nezha-fronted/build/webpack.prod.conf.js @@ -99,12 +99,24 @@ if (arg === 'html') { inlineSource: '.(js|css)$', // embed all javascript and css inline hash: false, inject: true, - minify: { - removeComments: true, - collapseWhitespace: true, - removeAttributeQuotes: true - // more options: - // https://github.com/kangax/html-minifier#options-quick-reference + // minify: { + // removeComments: true, + // collapseWhitespace: true, + // removeAttributeQuotes: true + // // more options: + // // https://github.com/kangax/html-minifier#options-quick-reference + // }, + minify: { // 压缩html + collapseWhitespace: true, // 折叠空白区域 + keepClosingSlash: true, // 保持闭合间隙 + removeComments: true, // 移除注释 + removeRedundantAttributes: true, // 删除冗余属性 + removeScriptTypeAttributes: true, // 删除Script脚本类型属性 + removeStyleLinkTypeAttributes: true, // 删除样式链接类型属性 + useShortDoctype: true, // 使用短文档类型 + preserveLineBreaks: true, // 保留换行符 + minifyCSS: true, // 压缩文内css + minifyJS: true // 压缩文内js }, // necessary to consistently work with multiple chunks via CommonsChunkPlugin chunksSortMode: 'dependency', diff --git a/nezha-fronted/config/index.js b/nezha-fronted/config/index.js index 92b754a70..004b3ab0c 100644 --- a/nezha-fronted/config/index.js +++ b/nezha-fronted/config/index.js @@ -20,7 +20,7 @@ module.exports = { }, // Various Dev Server settings // host: '0.0.0.0', // can be overwritten by process.env.HOST - host: 'localhost', // can be overwritten by process.env.HOST + host: '0.0.0.0', // can be overwritten by process.env.HOST port: 80, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, diff --git a/nezha-fronted/src/components/chart/chartHeader.vue b/nezha-fronted/src/components/chart/chartHeader.vue index a349c9198..83d968cf1 100644 --- a/nezha-fronted/src/components/chart/chartHeader.vue +++ b/nezha-fronted/src/components/chart/chartHeader.vue @@ -32,7 +32,7 @@ {{chartInfo.name}} ({{chartData ? chartData.length : 0}} charts) -
123123132123123123123123