Skip to content

Bug: Having monaco-editor in package.json causes many similar license files in the build #2740

Description

@itsmylife

Which package(s) does this bug affect?

  • Create Plugin
  • Sign Plugin
  • Plugin E2E
  • Plugin Meta Extractor
  • Plugin ESLint Rules

Package versions

v7.6.1 and v7.8.0 and maybe other versions too. But I tested with those two only.

What happened?

In https://github.com/grafana/grafana-prometheus-datasource we have proemtheus datasource and grafana-prometheus npm package which holds prometheus frontend components. When we build the datasource in the dist folder we have a bunch of license.txt files. Considering that we have monaco-editor in the grafana-prometheus package.json having license file is normal. But having 81 of them is not.

Image

What you expected to happen

I'd expect to have only one license file for monaco-editor not as many as the chunks of it.

How to reproduce it (as minimally and precisely as possible)

  1. Clone https://github.com/grafana/grafana-prometheus-datasource
  2. Install dependencies via yarn install
  3. Run 'yarn build'
  4. Check the root level dist folder

Environment

System:
    OS: macOS 26.5.1
    CPU: (14) arm64 Apple M4 Pro
    Memory: 113.61 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.16.0 - /Users/ismailsimsek.grafana/.nvm/versions/node/v24.16.0/bin/node
    Yarn: 4.15.0 - /Users/ismailsimsek.grafana/.nvm/versions/node/v24.16.0/bin/yarn
    npm: 11.13.0 - /Users/ismailsimsek.grafana/.nvm/versions/node/v24.16.0/bin/npm
    Deno: 2.7.5 - /Users/ismailsimsek.grafana/.deno/bin/deno
  Browsers:
    Chrome: 149.0.7827.156
    Firefox: 152.0.1
    Safari: 26.5
  npmPackages:
    @grafana/data: 13.1.0-25893932881 => 13.1.0-25893932881 
    @grafana/e2e-selectors: 13.1.0-25893932881 => 13.1.0-25893932881 
    @grafana/eslint-config: 9.0.0 => 9.0.0 
    @grafana/i18n: 13.1.0-25893932881 => 13.1.0-25893932881 
    @grafana/plugin-e2e: 3.5.1 => 3.5.1 
    @grafana/plugin-ui: 0.13.1 => 0.13.1 
    @grafana/prometheus: workspace:* => 13.1.6 
    @grafana/runtime: 13.1.0-25893932881 => 13.1.0-25893932881 
    @grafana/schema: 13.1.0-25893932881 => 13.1.0-25893932881 
    @grafana/sign-plugin: 3.3.1 => 3.3.1 
    @grafana/tsconfig: 2.0.1 => 2.0.1 
    @grafana/ui: 13.1.0-25893932881 => 13.1.0-25893932881

Additional context

Discussion thread https://raintank-corp.slack.com/archives/C05QFJUHUQ6/p1782282951105929

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    📬 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions