vite+vue+ts+elementplus架构问题生产环境多出来el-input__wrapper这个dom导致样式紊乱
同样的代码,测试环境就没有这个问题,生产环境就会多出来一个dom,有没有人碰到过?该怎么解决
打包命令:
生产环境:
"build:prod": "vue-tsc --noEmit --skipLibCheck && vite build"
测试环境:
"build:test": "vue-tsc --noEmit --skipLibCheck && vite build --mode test"
版本:
"element-plus": "^2.0.4",
"vue": "^3.2.25",
"vite": "^2.8.0",
"vue-tsc": "^0.29.8"
vite配置
问题dom
生产环境
测试环境
检查一下是不是构建过程中使用了ElementUI产生的缓存导致两个环境版本不一致
一般可以获取version的
import {version} from 'elelemt-plus'
然后打印version 比较一下版本是否不一致