You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import _, { isEmpty, round, cloneDeep, isUndefined } from "lodash";
^^^^^^^^^
SyntaxError: Named export 'cloneDeep' not found. The requested module 'lodash' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import _, { isEmpty, round, cloneDeep, isUndefined } from "lodash";
^^^^^^^^^
SyntaxError: Named export 'cloneDeep' not found. The requested module 'lodash' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'lodash';
const { isEmpty, round, cloneDeep, isUndefined } = pkg;
在vitepress 生产打包时会报这个错误
应该是咱们这个库没有配置好ESM,可以参考一下 vitepress的问题
有个naive-ui库也是这个问题,已经解决了
The text was updated successfully, but these errors were encountered: