From 51193342e71781fa95d8cd3eb9dbb0138cadd6aa Mon Sep 17 00:00:00 2001 From: Suren Atoyan Date: Mon, 21 Sep 2020 19:41:17 +0400 Subject: [PATCH] fix the broken link for next.js dynamic import --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eaf1a94..3cd3165 100644 --- a/README.md +++ b/README.md @@ -433,7 +433,7 @@ And if you use `electron` with `monaco` and `react` and have faced an issue diff ##### For `Next.js` users -Like other React components, this one also works with `Next.js` without a hitch. The part of the source that should be pre-parsed is optimized for server-side rendering, so, in usual cases, it will work fine, but if you want to have access, for example, to [`monacoInstance`]([https://github.com/suren-atoyan/monaco-react#monaco-instance](https://github.com/suren-atoyan/monaco-react#monaco-instance)) you should be aware that it wants to access the `document` object, and it requires browser environment. Basically you just need to avoid running that part out of browser environment, there are several ways to do that. The one is described [here]([https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr](https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr)). +Like other React components, this one also works with `Next.js` without a hitch. The part of the source that should be pre-parsed is optimized for server-side rendering, so, in usual cases, it will work fine, but if you want to have access, for example, to [`monacoInstance`]([https://github.com/suren-atoyan/monaco-react#monaco-instance](https://github.com/suren-atoyan/monaco-react#monaco-instance)) you should be aware that it wants to access the `document` object, and it requires browser environment. Basically you just need to avoid running that part out of browser environment, there are several ways to do that. The one is described [here](https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr). And if you use `monaco` with `Next.js` and have faced an issue different than the above-described one, please let us know to make this section more helpful.