Closed
Description
Hey :)
Given my Stimulus controller:
import { redo as commandRedo, undo as commandUndo } from "@codemirror/commands";
import { markdown } from "@codemirror/lang-markdown";
import { Compartment, EditorSelection } from "@codemirror/state";
import { githubDark } from "@fsegurai/codemirror-theme-github-dark";
import { githubLight } from "@fsegurai/codemirror-theme-github-light";
import { Controller } from "@hotwired/stimulus";
import { EditorView, basicSetup } from "codemirror";
import { codeLanguages } from "../codemirror/code_languages.js";
import { lightDarkThemeSwitcher } from "../codemirror/light_dark_theme_switcher.js";
/* stimulusFetch: 'lazy' */
export default class extends Controller {
static targets = ["textarea"];
static classes = ["editor"];
/* ... */
}
After being minified, the comment /* stimulusFetch: 'lazy' */
disappear from the source code:
Which load the controller (even if not needed since there are no data-controller="markdown-editor"
on the page) and load all the dependencies (a lot):
Metadata
Metadata
Assignees
Labels
No labels