arco-design / arco-design-pro-vue

An out-of-the-box solution to quickly build enterprise-level applications based on Arco Design.
https://pro.arco.design
MIT License
1.34k stars 275 forks source link

倒计时组件打包错误 #197

Closed guoyuexian770030596 closed 1 year ago

guoyuexian770030596 commented 1 year ago

Basic Info

Extra info

报错信息 [vite]: Rollup failed to resolve import "E:/word/uscm-web/node_modules/@arco-design/web-vue/es/countdown/style/css.js" from "src/views/login/components/forgot-password.vue?vue&type=sc ript&setup=true&lang.ts". 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 error during build: Error: [vite]: Rollup failed to resolve import "E:/word/uscm-web/node_modules/@arco-design/web-vue/es/countdown/style/css.js" from "src/views/login/components/forgot-password.vue?vue& type=script&setup=true&lang.ts". 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 at onRollupWarning (file:///E:/word/uscm-web/node_modules/vite/dist/node/chunks/dep-c842e491.js:46705:19) at onwarn (file:///E:/word/uscm-web/node_modules/vite/dist/node/chunks/dep-c842e491.js:46476:13) at Object.onwarn (file:///E:/word/uscm-web/node_modules/rollup/dist/es/shared/rollup.js:23263:13) at ModuleLoader.handleResolveId (file:///E:/word/uscm-web/node_modules/rollup/dist/es/shared/rollup.js:22158:26) at file:///E:/word/uscm-web/node_modules/rollup/dist/es/shared/rollup.js:22119:26 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What is expected?

期望可以尽快修复

Steps to reproduce

使用倒计时组件的时候。开发调试都正常,build的时候就会报错

sHow8e commented 1 year ago

@guoyuexian770030596 hi 可以尝试禁用按需样式部分的插件。https://github.com/arco-design/arco-design-pro-vue/blob/5530726c8c3279a6a163619381287dcaf9fae826/arco-design-pro-vite/config/vite.config.prod.ts#L16