Skip to content

Commit 1d9ae7a

Browse files
GiteaBotwxiaoguang
andauthored
Load jQuery as early as possible to support custom scripts (#35926) (#35929)
Backport #35926 by wxiaoguang Fix #35923 Co-authored-by: wxiaoguang <[email protected]>
1 parent 01873a9 commit 1d9ae7a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

web_src/js/index-domready.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import './globals.ts';
21
import '../fomantic/build/fomantic.js';
32
import '../../node_modules/easymde/dist/easymde.min.css'; // TODO: lazy load in "switchToEasyMDE"
43

web_src/js/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// bootstrap module must be the first one to be imported, it handles webpack lazy-loading and global errors
22
import './bootstrap.ts';
3+
4+
// many users expect to use jQuery in their custom scripts (https://docs.gitea.com/administration/customizing-gitea#example-plantuml)
5+
// so load globals (including jQuery) as early as possible
6+
import './globals.ts';
7+
38
import './webcomponents/index.ts';
49
import {onDomReady} from './utils/dom.ts';
510

0 commit comments

Comments
 (0)