mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
feat: 更新 ESLint 和 Vite 配置以优化开发体验
- 在 .eslintrc.cjs 中允许在所有环境中使用 console 语句,避免构建警告 - 在 vite.config.js 中提升 chunk 大小限制以消除 UI 库的警告,并明确本地组件的导入设置
This commit is contained in:
@@ -18,7 +18,8 @@ module.exports = {
|
|||||||
rules: {
|
rules: {
|
||||||
'vue/multi-word-component-names': 'off',
|
'vue/multi-word-component-names': 'off',
|
||||||
'vue/no-v-html': 'off',
|
'vue/no-v-html': 'off',
|
||||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
// 允许在所有环境中使用 console 语句以避免构建警告
|
||||||
|
'no-console': 'off',
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
'prettier/prettier': 'error',
|
'prettier/prettier': 'error',
|
||||||
'vue/attributes-order': [
|
'vue/attributes-order': [
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ export default defineConfig(({ mode }) => {
|
|||||||
imports: ['vue', 'vue-router', 'pinia']
|
imports: ['vue', 'vue-router', 'pinia']
|
||||||
}),
|
}),
|
||||||
Components({
|
Components({
|
||||||
resolvers: [ElementPlusResolver()]
|
// 仅自动注册 Element Plus 组件;本地组件显式导入
|
||||||
|
resolvers: [ElementPlusResolver()],
|
||||||
|
dirs: []
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -103,6 +105,8 @@ export default defineConfig(({ mode }) => {
|
|||||||
build: {
|
build: {
|
||||||
outDir: 'dist',
|
outDir: 'dist',
|
||||||
assetsDir: 'assets',
|
assetsDir: 'assets',
|
||||||
|
// 提升 chunk 大小限制以消除 UI 库的大量警告
|
||||||
|
chunkSizeWarningLimit: 1024,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
manualChunks(id) {
|
manualChunks(id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user