diff --git a/Elements/Button.tsx b/Elements/Button.tsx index 1f498a5..4fb8d42 100644 --- a/Elements/Button.tsx +++ b/Elements/Button.tsx @@ -1,6 +1,6 @@ import { Button as AntButton } from 'antd'; import type { BaseButtonProps } from 'antd/lib/button/button'; -import { throttle } from 'lodash'; +import { throttle } from 'lodash-es'; import type { FC } from 'react'; import type { BaseElementProps } from './types'; diff --git a/config/default-options.ts b/config/default-options.ts index 19e12e5..1273e97 100644 --- a/config/default-options.ts +++ b/config/default-options.ts @@ -1,4 +1,4 @@ -import { orderBy } from 'lodash'; +import { orderBy } from 'lodash-es'; import type { CalculationOptions } from 'stores/calculation/options/types'; const defaultOptions: CalculationOptions = { diff --git a/next.config.js b/next.config.js index a7300f1..fa82ad8 100644 --- a/next.config.js +++ b/next.config.js @@ -23,8 +23,8 @@ const nextConfig = { }, experimental: { modularizeImports: { - lodash: { - transform: 'lodash/{{member}}', + 'lodash-es': { + transform: 'lodash-es/{{member}}', preventFullImport: true, }, }, diff --git a/package.json b/package.json index 19d964a..b5c0c38 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "graphql": "14.0.2 - 14.2.0 || ^14.3.1 || ^15.0.0", "less": "^4.1.2", "less-loader": "^10.2.0", - "lodash": "^4.17.21", + "lodash-es": "^4.17.21", "mobx": "^6.5.0", "mobx-react-lite": "^3.4.0", "next": "^12.2.0", @@ -38,7 +38,7 @@ "use-debounce": "^8.0.1" }, "devDependencies": { - "@types/lodash": "^4.14.182", + "@types/lodash-es": "^4.17.6", "@types/node": "17.0.25", "@types/react": "18.0.5", "@types/react-dom": "18.0.1", diff --git a/stores/tables/insurance/index.ts b/stores/tables/insurance/index.ts index 57183d2..b499e55 100644 --- a/stores/tables/insurance/index.ts +++ b/stores/tables/insurance/index.ts @@ -1,7 +1,7 @@ /* eslint-disable object-curly-newline */ import type * as Insurance from 'Components/Calculation/Form/Insurance/InsuranceTable/types'; import * as insuranceTableConfig from 'config/tables/insurance-table'; -import { mergeWith } from 'lodash'; +import { mergeWith } from 'lodash-es'; import { makeAutoObservable } from 'mobx'; import type RootStore from 'stores/root'; import Validation from '../validation'; diff --git a/yarn.lock b/yarn.lock index f5ed3e5..3fbd6d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -874,7 +874,14 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/lodash@^4.14.182": +"@types/lodash-es@^4.17.6": + version "4.17.6" + resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.6.tgz#c2ed4c8320ffa6f11b43eb89e9eaeec65966a0a0" + integrity sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": version "4.14.182" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== @@ -3978,6 +3985,11 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash-es@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" + integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"