slicejs-web-framework 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Slice/Slice.js +10 -3
- package/package.json +1 -1
package/Slice/Slice.js
CHANGED
|
@@ -237,11 +237,18 @@ async function init() {
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
let frameworkClasses = null;
|
|
240
|
+
let bundleConfigJson = null;
|
|
240
241
|
try {
|
|
241
|
-
const
|
|
242
|
-
|
|
242
|
+
const response = await fetch('/bundles/bundle.config.json', { cache: 'no-store' });
|
|
243
|
+
if (response.ok) {
|
|
244
|
+
bundleConfigJson = await response.json();
|
|
245
|
+
}
|
|
246
|
+
} catch (error) {
|
|
247
|
+
// ignore
|
|
248
|
+
}
|
|
243
249
|
|
|
244
|
-
|
|
250
|
+
try {
|
|
251
|
+
if (bundleConfigJson?.production) {
|
|
245
252
|
await import('/bundles/slice-bundle.framework.js');
|
|
246
253
|
frameworkClasses = window.SLICE_FRAMEWORK_CLASSES || null;
|
|
247
254
|
}
|