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

打包构建TS验证不通过,导致失败 #89

Closed gaoxjin closed 2 years ago

gaoxjin commented 2 years ago

"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" run build --scripts-prepend-node-path=auto

arco-design-pro-vue@1.0.0 build vue-tsc --noEmit && vite build --config ./config/vite.config.prod.ts vite v2.9.7 building for production... ✓ 1267 modules transformed. ✨ [vite-plugin-imagemin]- compressed image resource successfully: [vite]: Rollup failed to resolve import "C:/Users/admin/Desktop/property/property-ui/node_modules/@arco-design/web-vue/e s/image-preview/style/css.js" from "src/views/bill/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 error during build: Error: [vite]: Rollup failed to resolve import "C:/Users/admin/Desktop/property/property-ui/node_modules/@arco-design/we b-vue/es/image-preview/style/css.js" from "src/views/bill/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 at onRollupWarning (C:\Users\admin\Desktop\property\property-ui\node_modules\vite\dist\node\chunks\dep-88bd5805.js:4 1499:19) at onwarn (C:\Users\admin\Desktop\property\property-ui\node_modules\vite\dist\node\chunks\dep-88bd5805.js:41315:13) at Object.onwarn (C:\Users\admin\Desktop\property\property-ui\node_modules\rollup\dist\shared\rollup.js:23226:13) at ModuleLoader.handleResolveId (C:\Users\admin\Desktop\property\property-ui\node_modules\rollup\dist\shared\rollup. js:22510:26) at C:\Users\admin\Desktop\property\property-ui\node_modules\rollup\dist\shared\rollup.js:22471:26

Process finished with exit code 1

sHow8e commented 2 years ago

@gaoxjin hihi 解决方法可以看一下这边哈 #71