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.
Files changed (2) hide show
  1. package/Slice/Slice.js +10 -3
  2. 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 bundleConfig = await import('/bundles/bundle.config.js');
242
- const isProduction = bundleConfig?.SLICE_BUNDLE_CONFIG?.production;
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
- if (isProduction) {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slicejs-web-framework",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "",
5
5
  "engines": {
6
6
  "node": ">=20"