只是修改注释
parent
b0e3fc8a7d
commit
c73b4d425d
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Generate additional configuration files when used for packaging. The file can be configured with some global variables, so that it can be changed directly externally without repackaging
|
||||
* 生成外部配置文件,用于生产发布后配置,无需重新打包
|
||||
*/
|
||||
import { GLOB_CONFIG_FILE_NAME, OUTPUT_DIR } from '../constant';
|
||||
import fs, { writeFileSync } from 'fs-extra';
|
||||
|
|
|
@ -13,9 +13,9 @@ export function configCompressPlugin(compress: 'gzip' | 'brotli' | 'none', delet
|
|||
if (compressList.includes('gzip')) {
|
||||
plugins.push(
|
||||
compressPlugin({
|
||||
threshold: 10240, // 对超过10k的数据压缩
|
||||
verbose: true,
|
||||
disable: false,
|
||||
threshold: 10240,
|
||||
algorithm: 'gzip',
|
||||
ext: '.gz',
|
||||
deleteOriginFile,
|
||||
|
|
|
@ -19,11 +19,11 @@ export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
|
|||
const htmlPlugin: PluginOption[] = createHtmlPlugin({
|
||||
minify: isBuild,
|
||||
inject: {
|
||||
// Inject data into ejs template
|
||||
// 修改模板html的标题
|
||||
data: {
|
||||
title: VITE_GLOB_APP_TITLE,
|
||||
},
|
||||
// Embed the generated app.config.js file
|
||||
// 将app.config.js文件注入到模板html中
|
||||
tags: isBuild
|
||||
? [
|
||||
{
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// 【图片压缩插件】
|
||||
// Image resource files used to compress the output of the production environment
|
||||
// https://github.com/anncwb/vite-plugin-imagemin
|
||||
import viteImagemin from 'vite-plugin-imagemin';
|
||||
|
|
|
@ -65,10 +65,10 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
|
|||
|
||||
// The following plugins only work in the production environment
|
||||
if (isBuild) {
|
||||
// 图片资源压缩插件 vite-plugin-imagemin
|
||||
// vite-plugin-imagemin
|
||||
VITE_USE_IMAGEMIN && vitePlugins.push(configImageminPlugin());
|
||||
|
||||
// 文件gzip压缩 rollup-plugin-gzip
|
||||
// rollup-plugin-gzip
|
||||
vitePlugins.push(configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE));
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* 【样式按需加载插件 ——主要处理antd的样式】
|
||||
* Introduces component library styles on demand.
|
||||
* https://github.com/anncwb/vite-plugin-style-import
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@ export default [
|
|||
method: 'get',
|
||||
response: ({ query }) => {
|
||||
const { keyword,count} = query;
|
||||
console.log(keyword);
|
||||
console.log("查询条件:", keyword);
|
||||
return resultSuccess(demoList(keyword,count));
|
||||
},
|
||||
},
|
||||
|
|
|
@ -31,7 +31,7 @@ export default [
|
|||
method: 'get',
|
||||
response: ({ query }) => {
|
||||
const { keyword } = query;
|
||||
console.log(keyword);
|
||||
console.log("查询条件:", keyword);
|
||||
return resultSuccess(demoTreeList(keyword));
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue