Load jQuery as early as possible to support custom scripts (#35926) (#35929)

Backport #35926 by wxiaoguang

Fix #35923

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
pull/35934/head
Giteabot 2025-11-12 07:24:21 +08:00 committed by GitHub
parent 01873a99c1
commit 1d9ae7ac23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,3 @@
import './globals.ts';
import '../fomantic/build/fomantic.js'; import '../fomantic/build/fomantic.js';
import '../../node_modules/easymde/dist/easymde.min.css'; // TODO: lazy load in "switchToEasyMDE" import '../../node_modules/easymde/dist/easymde.min.css'; // TODO: lazy load in "switchToEasyMDE"

View File

@ -1,5 +1,10 @@
// bootstrap module must be the first one to be imported, it handles webpack lazy-loading and global errors // bootstrap module must be the first one to be imported, it handles webpack lazy-loading and global errors
import './bootstrap.ts'; import './bootstrap.ts';
// many users expect to use jQuery in their custom scripts (https://docs.gitea.com/administration/customizing-gitea#example-plantuml)
// so load globals (including jQuery) as early as possible
import './globals.ts';
import './webcomponents/index.ts'; import './webcomponents/index.ts';
import {onDomReady} from './utils/dom.ts'; import {onDomReady} from './utils/dom.ts';