Skip to content

Commit

Permalink
1. 忽略 VITE_CJS_IGNORE_WARNING 告警
Browse files Browse the repository at this point in the history
2. 忽略 @unocss/order 和 @unocss/order-attributify 告警
3. 修复 https 配置项的告警
  • Loading branch information
YunaiV committed Feb 29, 2024
1 parent ff0566b commit 9b0890d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ module.exports = defineConfig({
],
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off',
'prettier/prettier': 'off' // 芋艿:默认关闭 prettier 的 ESLint 校验,因为我们使用的是 IDE 的 Prettier 插件
'prettier/prettier': 'off', // 芋艿:默认关闭 prettier 的 ESLint 校验,因为我们使用的是 IDE 的 Prettier 插件
'@unocss/order': 'off', // 芋艿:禁用 unocss 【css】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐
'@unocss/order-attributify': 'off' // 芋艿:禁用 unocss 【属性】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐
}
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"private": false,
"scripts": {
"i": "pnpm install",
"dev": "vite --mode local-dev",
"dev": "VITE_CJS_IGNORE_WARNING=true vite --mode local-dev",
"dev-server": "vite --mode dev",
"ts:check": "vue-tsc --noEmit",
"build:local-dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode local-dev",
Expand Down
5 changes: 1 addition & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
root: root,
// 服务端渲染
server: {
// 是否开启 https
https: false,
// 端口号
port: env.VITE_PORT,
port: env.VITE_PORT, // 端口号
host: "0.0.0.0",
open: env.VITE_OPEN === 'true',
// 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域
Expand Down

0 comments on commit 9b0890d

Please sign in to comment.