From 47a0d8805611d64001109e2ea0f8df34091bd793 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 1 Apr 2026 06:31:11 +0200 Subject: [PATCH] Remove leftover `webpackChunkName` comments from codeeditor (#37062) Followup to https://github.com/go-gitea/gitea/pull/36764, forgot to remove this from the vite migration. --- This PR was written with the help of Claude Opus 4.6 Co-authored-by: Claude (Opus 4.6) --- web_src/js/modules/codeeditor/linter.ts | 2 +- web_src/js/modules/codeeditor/main.ts | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/web_src/js/modules/codeeditor/linter.ts b/web_src/js/modules/codeeditor/linter.ts index 8536601146..1d175cf663 100644 --- a/web_src/js/modules/codeeditor/linter.ts +++ b/web_src/js/modules/codeeditor/linter.ts @@ -3,7 +3,7 @@ import type {Extension} from '@codemirror/state'; /** Creates a linter for JSON files using `jsonParseLinter` from `@codemirror/lang-json`. */ export async function createJsonLinter(cm: CodemirrorModules): Promise { - const {jsonParseLinter} = await import(/* webpackChunkName: "codemirror" */ '@codemirror/lang-json'); + const {jsonParseLinter} = await import('@codemirror/lang-json'); const baseLinter = jsonParseLinter(); return cm.lint.linter((view) => { return baseLinter(view).map((d) => { diff --git a/web_src/js/modules/codeeditor/main.ts b/web_src/js/modules/codeeditor/main.ts index 743b72973a..320d73dd9f 100644 --- a/web_src/js/modules/codeeditor/main.ts +++ b/web_src/js/modules/codeeditor/main.ts @@ -45,17 +45,17 @@ export type CodemirrorModules = Awaited>; async function importCodemirror() { const [autocomplete, commands, language, languageData, lint, search, state, view, highlight, indentMarkers, vscodeKeymap] = await Promise.all([ - import(/* webpackChunkName: "codemirror" */ '@codemirror/autocomplete'), - import(/* webpackChunkName: "codemirror" */ '@codemirror/commands'), - import(/* webpackChunkName: "codemirror" */ '@codemirror/language'), - import(/* webpackChunkName: "codemirror" */ '@codemirror/language-data'), - import(/* webpackChunkName: "codemirror" */ '@codemirror/lint'), - import(/* webpackChunkName: "codemirror" */ '@codemirror/search'), - import(/* webpackChunkName: "codemirror" */ '@codemirror/state'), - import(/* webpackChunkName: "codemirror" */ '@codemirror/view'), - import(/* webpackChunkName: "codemirror" */ '@lezer/highlight'), - import(/* webpackChunkName: "codemirror" */ '@replit/codemirror-indentation-markers'), - import(/* webpackChunkName: "codemirror" */ '@replit/codemirror-vscode-keymap'), + import('@codemirror/autocomplete'), + import('@codemirror/commands'), + import('@codemirror/language'), + import('@codemirror/language-data'), + import('@codemirror/lint'), + import('@codemirror/search'), + import('@codemirror/state'), + import('@codemirror/view'), + import('@lezer/highlight'), + import('@replit/codemirror-indentation-markers'), + import('@replit/codemirror-vscode-keymap'), ]); return {autocomplete, commands, language, languageData, lint, search, state, view, highlight, indentMarkers, vscodeKeymap}; }