编译时去除eslint警告

This commit is contained in:
yangjian 2024-10-24 15:33:58 +08:00
parent 75f198d8f4
commit 9f7d7195c2

View File

@ -44,15 +44,14 @@ export default defineConfig(({ command })=> {
resolvers: command === 'build' ? [ElementPlusResolver()] : [],
dts: 'src/auto-import/components.d.ts'
}),
// eslint
eslintPlugin({
include: ['src/**/*.js', 'src/**/*.vue', 'src/*.js', 'src/*.vue']
}),
// 对大于 1k 的文件进行压缩
viteCompression({
threshold: 1000,
})
],
].concat(
// eslint
command !== 'build' ? [eslintPlugin({ include: ['src/**/*.js', 'src/**/*.vue', 'src/*.js', 'src/*.vue'] })] : []
),
server: {
host: true,
port: 9527,