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.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit db4f151be5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
ace4e71eb8
commit
d0de116c8f
|
|
@ -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",
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue