报错:
Rollup failed to resolve import lodash-es/reduce
error during build:
[vite]: Rollup failed to resolve import "lodash-es/each" from "/Volumes/xx/node_modules/.pnpm/@unovis+graphlibrary@2.2.0-2/node_modules/@unovis/graphlibrary/dist/json.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:
[vite]: Rollup failed to resolve import "lodash-es/each" from "/Volumes/xx/node_modules/.pnpm/@unovis+graphlibrary@2.2.0-2/node_modules/@unovis/graphlibrary/dist/json.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`
解决方案:
引入plugin-node-resolve