Bugzilla – Attachment 188316 Details for
Bug 36674
Lazy load api-client JS files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36674: Fix warning
Bug-36674-Fix-warning.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2025-10-23 09:58:27 UTC
(
hide
)
Description:
Bug 36674: Fix warning
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-10-23 09:58:27 UTC
Size:
1.52 KB
patch
obsolete
>From 1ba1fe23fc4dcd23c88d67804d9fb58873475f2b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 23 Oct 2025 11:58:00 +0200 >Subject: [PATCH] Bug 36674: Fix warning >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >WARNING in ./koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js > â Module parse warning: > â°ââ¶ â Critical dependency: the request of a dependency is an expression > ââ[226:26] > 224 â key, > 225 â createClientProxy(function() { > 226 â return import(path); > · âââââ > 227 â }) > 228 â ]; > â°ââââ >--- > koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js >index ef758dbc9ba..93e1ece7aed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/api-client.js >@@ -196,10 +196,11 @@ const apiClientFiles = { > default: "./default-api-client.js", > }; > >+const context = require.context("./", false, /\.js$/); > export const APIClient = Object.fromEntries( > Object.entries(apiClientFiles).map(([key, path]) => [ > key, >- createClientProxy(() => import(path)), >+ createClientProxy(() => context(`./${path}.js`)), > ]) > ); > >-- >2.34.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 36674
:
186551
|
186616
|
186617
|
186994
|
186995
|
187826
|
188316
|
188326
|
189012
|
189153
|
189551