This pull request will downgrade nanoid from v3 to v2 because nanoid v3 doesn't support IE11.
Alternative solution
At first, I tried to allow the both versions, v2 and v3, with the following patch.
diff --git a/src/state/editor.js b/src/state/editor.js
index 3f67851..514b2e8 100644
--- a/src/state/editor.js
+++ b/src/state/editor.js
@@ -1,7 +1,7 @@
import { DOMSerializer } from "prosemirror-model";
import { Container } from "unstated";
import { prettyPrint } from "html";
-import { nanoid } from "nanoid";
+import { nanoid } from "../utils/nanoid";
import subscribeOnUpdates from "../utils/subscribe-on-updates";
import findNodeIn, { findNodeInJSON } from "../utils/find-node";
import getEditorStateClass from "./get-editor-state";
diff --git a/src/state/json-diff-worker.js b/src/state/json-diff-worker.js
index 2fcdb7e..da07585 100644
--- a/src/state/json-diff-worker.js
+++ b/src/state/json-diff-worker.js
@@ -1,4 +1,4 @@
-import { nanoid } from "nanoid";
+import { nanoid } from "../utils/nanoid";
import { IdleScheduler } from "./idle-scheduler";
export class JsonDiffWorker {
diff --git a/src/utils/nanoid.js b/src/utils/nanoid.js
new file mode 100644
index 0000000..cbdc58d
--- /dev/null
+++ b/src/utils/nanoid.js
@@ -0,0 +1,3 @@
+import nanoidDefault, { nanoid as nanoidNamed } from "nanoid";
+
+export const nanoid = nanoidNamed || nanoidDefault;
Probably It works well (I didn't test it enough), but I got a warning from webpack that is used in my project.
WARNING in ./node_modules/prosemirror-dev-tools/dist/esm/utils/nanoid.js 3:17-30
"export 'default' (imported as 'nanoidDefault') was not found in 'nanoid'
And I think this solution is tricky, so I just downgraded nanoid to v2.
ref: https://github.com/d4rkr00t/prosemirror-dev-tools/issues/105#issuecomment-650910228
This pull request will downgrade nanoid from v3 to v2 because nanoid v3 doesn't support IE11.
Alternative solution
At first, I tried to allow the both versions, v2 and v3, with the following patch.
Probably It works well (I didn't test it enough), but I got a warning from webpack that is used in my project.
And I think this solution is tricky, so I just downgraded nanoid to v2.