vite packaging error
Error: [vite]: Rollup failed to resolve import "D:/demo/node_modules/ant-design-vue/es/time-range-picker/style/index" from "src/views/coupon/components/UseTime/index.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`
The reason for the error may be that the time-range-picker component is not directly exported in ant, but I used it directly in the page.
Use import { TimeRangePicker} from 'ant-design-vue'; to write in this way, running directly locally will not report an error, but it will report an error when yarn build is packaged.
Solution: Modify the import wording as
import {
TimePicker} from 'ant-design-vue';
components: {
TimeRangePicker: TimePicker.TimeRangePicker}
<TimeRangePicker>
或
<TimePicker.TimeRangePicker>
Again the packaging issue was resolved.