Skip to content

[WebProfilerBundle] Don't load external JS dependencies in Workflow profiler #54416

Closed
@javiereguiluz

Description

@javiereguiluz

In my opinion, all features of WebProfilerBundle should work even if you don't have an active Internet connection. This is both for security reasons (to not make connections to third-party services from your work environment) and for practical reasons (those external connections could be restricted in your company or your Internet connection could be weak or failing).

That's why we embed things like SVG icons and serve custom web fonts via the ProfilerController.

However, the workflow.html.twig has this:

import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';

I tried to fix this but I can't:

  • I downloaded mermaid.min.js from jsDelivr, but it's a 3.3 MB file 😰
  • I tried to only get the files related to "flowChart", which is the only feature needed here, but I can't.

So, is there some JavaScript expert who can tell us how to get all these files in a single JS file (e.g. mermaid-flowchart.min.js) so we can include that from the Profiler?

image

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions