From e5f5d57077b39f5d69141935d8b089e219d82414 Mon Sep 17 00:00:00 2001 From: Matthieu Libeer Date: Wed, 31 Jan 2024 19:29:15 +0100 Subject: [PATCH 1/2] Update `lodash.last` import in `getLastEntryEnclosedInToggle.ts` Module not found: Error: Can't resolve 'lodash/last' in '/app/node_modules/@udecode/plate-toggle/dist' Did you mean 'last.js'? BREAKING CHANGE: The request 'lodash/last' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. --- packages/toggle/src/queries/getLastEntryEnclosedInToggle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toggle/src/queries/getLastEntryEnclosedInToggle.ts b/packages/toggle/src/queries/getLastEntryEnclosedInToggle.ts index 373262da2b..cb756a26a4 100644 --- a/packages/toggle/src/queries/getLastEntryEnclosedInToggle.ts +++ b/packages/toggle/src/queries/getLastEntryEnclosedInToggle.ts @@ -1,5 +1,5 @@ import { PlateEditor, TNodeEntry, Value } from '@udecode/plate-common'; -import last from 'lodash/last'; +import last from 'lodash/last.js'; import { buildToggleIndex } from '../toggle-controller-store'; From 7fcf61c482ba7f166c4517fbe8587e73ade9b237 Mon Sep 17 00:00:00 2001 From: Ziad Beyens Date: Wed, 31 Jan 2024 19:31:08 +0100 Subject: [PATCH 2/2] Create shiny-steaks-whisper.md --- .changeset/shiny-steaks-whisper.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/shiny-steaks-whisper.md diff --git a/.changeset/shiny-steaks-whisper.md b/.changeset/shiny-steaks-whisper.md new file mode 100644 index 0000000000..3f3e1d88d7 --- /dev/null +++ b/.changeset/shiny-steaks-whisper.md @@ -0,0 +1,5 @@ +--- +"@udecode/plate-toggle": patch +--- + +Fix `lodash.last` import