Bugzilla – Attachment 171568 Details for
Bug 37824
Replace webpack with rspack for fun and profit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37824: (QA follow-up) Fix improper handling of jQuery and DataTables libraries by marking them as externals
Bug-37824-QA-follow-up-Fix-improper-handling-of-jQ.patch (text/plain), 1.72 KB, created by
Paul Derscheid
on 2024-09-16 16:30:17 UTC
(
hide
)
Description:
Bug 37824: (QA follow-up) Fix improper handling of jQuery and DataTables libraries by marking them as externals
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-09-16 16:30:17 UTC
Size:
1.72 KB
patch
obsolete
>From 439e67d1e840203e91ac85ea91f51567a7bb5220 Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Mon, 16 Sep 2024 16:25:36 +0000 >Subject: [PATCH] Bug 37824: (QA follow-up) Fix improper handling of jQuery and > DataTables libraries by marking them as externals > >This commit addresses an issue where jQuery and DataTables libraries (datatables.net and related extensions) were not functioning correctly when bundled with rspack. These libraries expect to be loaded in the global scope rather than as bundled modules, leading to initialization issues. > >To resolve this, jQuery and all related DataTables libraries (datatables.net, datatables.net-buttons, datatables.net-buttons/js/buttons.html5, etc.) are marked as externals in the rspack configuration. This ensures they are treated as global dependencies, preventing conflicts and allowing proper initialization. >--- > rspack.config.js | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/rspack.config.js b/rspack.config.js >index 54eefc216f..6a8e40c4f6 100644 >--- a/rspack.config.js >+++ b/rspack.config.js >@@ -21,6 +21,7 @@ module.exports = { > "koha-tmpl/intranet-tmpl/prog/js/vue/dist/" > ), > chunkFilename: "[name].js", >+ globalObject: "window", > }, > module: { > rules: [ >@@ -63,4 +64,12 @@ module.exports = { > __VUE_PROD_DEVTOOLS__: false, > }), > ], >+ externals: { >+ jquery: "jQuery", >+ "datatables.net": "DataTable", >+ "datatables.net-buttons": "DataTable", >+ "datatables.net-buttons/js/buttons.html5": "DataTable", >+ "datatables.net-buttons/js/buttons.print": "DataTable", >+ "datatables.net-buttons/js/buttons.colVis": "DataTable", >+ }, > }; >-- >2.46.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37824
:
170992
|
171126
|
171438
|
171552
| 171568 |
171909
|
172113