monaco-editor: unknown Expression of type "ClassExpression
**monaco-editor version:0.21.2 **Browser:Chrome **OS:Macos Playground code that reproduces the issue: **Typescript version 4.0.2
TypeScript compiler gives an error node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordDistance.js: unknown Expression of type "ClassExpression" When I install versions 0.21.2 and 0.21.1 but version 0.2.0 works fine.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15
create-react-app 4.0.0 has been released and supports typescript 4. I still have to downgrade to monoco-editor 0.20.0 for it to build.
Has anyone found a workaround for this? I’m surprised nobody has tried to build ESM Monaco-editor within react in the past 9 months.
The FB regenerator project looks like it hasn’t had a public release in over 4 years.
@mike-lischke I have also this same problem, many thanks for @cxcorp for deep investigation. In my own analysis I have found that problem should be with package caniuse-lite that provides targets for browserslist pacakge. After adding below config to my package.json @babel/preset-env from react-scripts should provide additional plugin https://babeljs.io/docs/en/babel-plugin-transform-classes
@alexdima I think this issue should be closed, it not relevant to monaco-editor