Using monaco-editor in angular

Discussão em 'Angular' iniciado por Dvora, Fevereiro 18, 2025.

  1. Dvora

    Dvora Guest

    In my angular (19) app, I installed monaco-editor:

    npm install monaco-editor@0.52.2


    and used it in a component.

    However, the component test spec will now fail with such an error:

    ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetSession.css:6:0 - Error: Module parse failed: Unexpected token (6:0)
    You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.


    and other ~90 like those...

    My Angular project is configured to use .scss. Apparently, the Monaco editor wants .css

    How can I fix the test?

    Thanks

    Continue reading...

Compartilhe esta Página