Skip to content

Bundle monaco editor files #26

Description

@luis-dk

I'm submitting a ...

[ ] bug report
[x] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project

Summary

When creating an editor instance, the monaco-editor library will use the monaco-loader configuration to fetch the Javascript files for the workers started by the editor (and any other required resource).

By default, monaco-loader is configured to fetch such resources from a CDN (refer to Screenshot A) but, it can be configured to fetch from specific path or by including monaco-editor in your final bundle.

Requested Feature

Provide an InjectionToken for users to configure the loader and run loader.config(...) before running loader.init(...) in the APP_INITIALIZER.

E.g.:

{
  provide: NGX_MONACO_LOADER_CONFIG,
  useValue: {
    paths: {
      vs: '...',
    },
    'vs/nls' : {
      availableLanguages: {
      '*': 'de',
    },
  },
}

Other information

Screenshot A (no config, using CDN)
image

Screenshot B (configured loader, fetched from the application server)
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions