There are a couple of issues opened and closed in the monaco-editor repo (#1322, #1514, #2446) but I can't find one in this repo despite that the related source code is here, so I am opening one for traceability.
Inspecting the tasks code in the build folder, I believe that the reason behind this is that the ESM files are only built by the tsc command while the AMD files are compiled with custom code in build/lib/tsb. More importantly the AMD files pass though the build/lib/nls.ts transformer but the ESM files do not, so I guess a simple line of nls.nls() does the job. I am new to this repo and am not sure what needs to be done additionally, or else I were opening a PR implementing this.
@TylerLeonhardt we worked on a story for the AMD build of the Monaco editor but for ESM no effort has been spent yet. I am actually not sure either what the effort would be to get this working.
Search Terms: ES modules, NPM, build, gulp tasks
There are a couple of issues opened and closed in the monaco-editor repo (#1322, #1514, #2446) but I can't find one in this repo despite that the related source code is here, so I am opening one for traceability.
Non-official solutions like blutorange/primefaces-monaco/ESM-I18N.md and repos like wang12124468/monaco-editor-nls are not ideal because these solutions are regex-based and require additional steps.
Inspecting the tasks code in the
build
folder, I believe that the reason behind this is that the ESM files are only built by thetsc
command while the AMD files are compiled with custom code inbuild/lib/tsb
. More importantly the AMD files pass though thebuild/lib/nls.ts
transformer but the ESM files do not, so I guess a simple line ofnls.nls()
does the job. I am new to this repo and am not sure what needs to be done additionally, or else I were opening a PR implementing this.