npm run dev is fine. npm run build throws an error;
vue3 + vite + tdesign-mobile-vue;
[vite]: Rollup failed to resolve import “lodash/throttle” from “node_modules/tdesign-mobile-vue/es/index.js”.
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 “lodash/throttle” from “node_modules/tdesign-mobile-vue/es/index.js”.
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
Hope it’s packed properly
ranmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.