引入的这个vue
import ElImageViewer from 'element-ui/packages/image/src/image-viewer.vue'
打包时会提示引入的vue文件的格式问题 (不止这个一个格式问题,需要忽略整个文件)
ERROR in F:/git_project/Realink-Web/realink_desktop_next/node_modules/element-ui/packages/image/src/image-viewer.vue(55,51):
55:51 Unnecessary semicolon
53 |
54 | <script>
> 55 | import { on, off } from 'element-ui/src/utils/dom';
| ^
56 | import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
57 |
58 | const Mode = {
error in F:/git_project/Realink-Web/realink_desktop_next/node_modules/element-ui/packages/image/src/image-viewer.vue
tsconfig.json设置exclude也没用
{
"exclude": [
"node_modules",
"node_modules/element-ui/packages/image/src/image-viewer.vue"
]
}
如何才能在打包的时候忽略检查依赖里面的规则呢?
试试这样引入import elImageViewer from "element-ui";