yarn build 时提示如下错识
error during build:
Error: [vite]: Rollup failed to resolve import "..." from "/Users/owen/html/bs-journey/src/components/UnScenic.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
错误原因
编译时会检查模板中的src标识, 如果src引用地址不存在就会报错。
<template><img src="..." class="card-img-top" alt="...">
</template>
排这个错要靠经验!而非提示。
总结
vue编译出错时,不一定是import找不到组件, html中的src引用在编译时也会检查。