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
Describe the bug
First of all, thank you for the very useful package.
In the application I use these lines of code to import stuff I need for custom editor:
import MonacoContainer from '@monaco-editor/react/lib/cjs/MonacoContainer';
import useMount from '@monaco-editor/react/lib/cjs/hooks/useMount';
import useUpdate from '@monaco-editor/react/lib/cjs/hooks/useUpdate';
import usePrevious from '@monaco-editor/react/lib/cjs/hooks/usePrevious';
import {
noop,
getOrCreateModel,
isUndefined,
} from '@monaco-editor/react/lib/cjs/utils';
That works fine at least in 4.3.1. I can see cjs folder exists in node_modules.
But with the latest 4.6.0 version structure is different and looks like main.js does not export those items.
Maybe this is something with my package manager (pnpm) because I can see those hooks and MonacoContainer still exist in the source code.
To Reproduce
Steps to reproduce the behavior:
Install 4.6.0 version of the package
Expected behavior
I expect to still be able to import those elements.
Screenshots
Before (4.3.1):
After (4.6.0):
Desktop (please complete the following information):
OS: MacOS
Node: 20
pnpm: 9.1.1
Additional context
I use pnpm and nx monorepo, not sure if that matters though.
The text was updated successfully, but these errors were encountered:
Ah, I see what you are saying. Unfortunately, with the current build these utilities/hooks are not available.
for useMount, useUpdate and usePreviouse you can use react-use or write your own implementations (they are pretty small), check this to get some inspiration
for noop you can use lodash/noop, or write your own implementation. For this and for other utilities check this
Describe the bug
First of all, thank you for the very useful package.
In the application I use these lines of code to import stuff I need for custom editor:
That works fine at least in 4.3.1. I can see cjs folder exists in node_modules.
But with the latest 4.6.0 version structure is different and looks like main.js does not export those items.
Maybe this is something with my package manager (pnpm) because I can see those hooks and MonacoContainer still exist in the source code.
To Reproduce
Steps to reproduce the behavior:
Install 4.6.0 version of the package
Expected behavior
I expect to still be able to import those elements.
Screenshots
Before (4.3.1):
After (4.6.0):
Desktop (please complete the following information):
Additional context
I use pnpm and nx monorepo, not sure if that matters though.
The text was updated successfully, but these errors were encountered: