提交 c40ecee6 作者: 方治民

fix: 修复 build 运行异常问题

上级 44d919ba
......@@ -10,16 +10,18 @@ VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
VITE_BUILD_COMPRESS = 'gzip'
# Whether to delete origin files when using compress, default false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
# VITE_GLOB_API_URL=/basic-api
VITE_GLOB_API_URL=http://192.168.0.156:8081
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
# VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_API_URL_PREFIX=/api
# File upload address, optional
# It can be forwarded by nginx or write the actual address directly
......
......@@ -135,5 +135,11 @@
"pnpm",
"antd"
],
"vue-i18n.i18nPaths": "src\\locales,src\\locales\\lang,public\\resource\\tinymce\\langs"
"vue-i18n.i18nPaths": "src\\locales,src\\locales\\lang,public\\resource\\tinymce\\langs",
"[properties]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"[nginx]": {
"editor.defaultFormatter": "teclado.vscode-nginx-format"
}
}
......@@ -31,14 +31,10 @@ function createConfig(params: CreateConfigParams) {
fs.mkdirp(getRootPath(OUTPUT_DIR))
writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr)
console.log(
colors.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`,
)
console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`)
console.log(colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)) + '\n')
} catch (error) {
console.log(
colors.red('configuration file configuration file failed to package:\n' + error),
)
console.log(colors.red('configuration file configuration file failed to package:\n' + error))
}
}
......
......@@ -8,4 +8,12 @@ module.exports = {
proseWrap: 'never',
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'lf',
overrides: [
{
files: ['*.yml', '*.yaml'],
options: {
tabWidth: '2',
},
},
],
}
import { defHttp } from '/@/utils/http/axios'
enum Api {
// The address does not exist
Error = '/error',
}
/**
* @description: Trigger ajax error
*/
export const fireErrorApi = () => defHttp.get({ url: Api.Error })
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论