zikaari / monaco-textmate

MIT License
81 stars 10 forks source link

Fixed compiled javascript syntax errors in IE11 #6

Closed dannymcgee closed 5 years ago

dannymcgee commented 5 years ago

I'm currently using codemirror-textmate in an Angular project which I would like to support IE11, but the compiled JavaScript for this package (which is a dependency of codemirror-textmate) currently breaks the app in IE11 because it includes arrow functions. Changing the target to es5 and moving esnext to lib in the tsconfig compilerOptions fixes this problem.

Note that this issue occurs even though I'm loading the default CodeMirror modes instead of the TM grammars for IE11 (because no WASM in IE11) because Angular concatenates all JS dependencies into a single file. I haven't yet explored using code splitting to avoid loading this dependency entirely if it's not needed, but I'm not sure if that's possible with the way lazy-loading works in Angular.

zikaari commented 5 years ago

Thanks, @dannymcgee!

zikaari commented 5 years ago

Please npm i monaco-textmate again to get 3.0.1