slicejs-cli 2.8.1 → 2.8.2
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.
|
@@ -398,10 +398,14 @@ export default class BundleGenerator {
|
|
|
398
398
|
|
|
399
399
|
// 2. Route bundles
|
|
400
400
|
for (const [routeKey, bundle] of Object.entries(this.bundles.routes)) {
|
|
401
|
+
const routeIdentifier = Array.isArray(bundle.path || bundle.paths)
|
|
402
|
+
? routeKey
|
|
403
|
+
: (bundle.path || bundle.paths || routeKey);
|
|
404
|
+
|
|
401
405
|
const routeFile = await this.createBundleFile(
|
|
402
406
|
bundle.components,
|
|
403
407
|
'route',
|
|
404
|
-
|
|
408
|
+
routeIdentifier
|
|
405
409
|
);
|
|
406
410
|
files.push(routeFile);
|
|
407
411
|
}
|
|
@@ -627,9 +631,13 @@ if (window.slice && window.slice.controller) {
|
|
|
627
631
|
};
|
|
628
632
|
|
|
629
633
|
for (const [key, bundle] of Object.entries(this.bundles.routes)) {
|
|
634
|
+
const routeIdentifier = Array.isArray(bundle.path || bundle.paths)
|
|
635
|
+
? key
|
|
636
|
+
: (bundle.path || bundle.paths || key);
|
|
637
|
+
|
|
630
638
|
config.bundles.routes[key] = {
|
|
631
639
|
path: bundle.path || bundle.paths || key, // Support both single path and array of paths, fallback to key
|
|
632
|
-
file: `slice-bundle.${this.routeToFileName(
|
|
640
|
+
file: `slice-bundle.${this.routeToFileName(routeIdentifier)}.js`,
|
|
633
641
|
size: bundle.size,
|
|
634
642
|
components: bundle.components.map(c => c.name),
|
|
635
643
|
dependencies: ['critical']
|