@quincarter/create-lit-app 1.1.2 → 1.1.4
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/bin/create-lit-app.js +1 -1
- package/bin/create-lit-app.ts +1 -1
- package/create-app-shell.sh +21 -4
- package/package.json +1 -1
package/bin/create-lit-app.js
CHANGED
package/bin/create-lit-app.ts
CHANGED
package/create-app-shell.sh
CHANGED
|
@@ -1607,7 +1607,6 @@ export const ViewMixin = <T extends Constructor<LitElement>>(superClass: T) => {
|
|
|
1607
1607
|
|
|
1608
1608
|
connectedCallback(): void {
|
|
1609
1609
|
super.connectedCallback();
|
|
1610
|
-
this.featureIsEnabled = true;
|
|
1611
1610
|
this.mfeLoader?.init();
|
|
1612
1611
|
}
|
|
1613
1612
|
|
|
@@ -1799,7 +1798,14 @@ if [ "$ENABLE_CONTEXT" = true ]; then
|
|
|
1799
1798
|
IMPORTS="$IMPORTS
|
|
1800
1799
|
import { provide } from '@lit/context';
|
|
1801
1800
|
import { AccessesContext } from './shared/contexts/accesses.context';
|
|
1802
|
-
import { NavigationContext } from './shared/contexts/navigation.context';
|
|
1801
|
+
import { NavigationContext } from './shared/contexts/navigation.context';"
|
|
1802
|
+
fi
|
|
1803
|
+
|
|
1804
|
+
# MFE loader context is provided independently of ENABLE_CONTEXT so the
|
|
1805
|
+
# micro-frontend (MFE) utility works even when context features are off.
|
|
1806
|
+
if [ "$ENABLE_MFE_LOADER" = true ]; then
|
|
1807
|
+
IMPORTS="$IMPORTS
|
|
1808
|
+
import { provide } from '@lit/context';
|
|
1803
1809
|
import { MfeLoaderContext } from './shared/contexts/mfe-loader.context';"
|
|
1804
1810
|
fi
|
|
1805
1811
|
|
|
@@ -1841,13 +1847,16 @@ cat <<EOF >> src/app-shell.ts
|
|
|
1841
1847
|
@property({ type: Array })
|
|
1842
1848
|
accesses: string[] = ["public"];
|
|
1843
1849
|
EOF
|
|
1844
|
-
|
|
1850
|
+
fi
|
|
1851
|
+
|
|
1852
|
+
# Provide the MFE loader independently of ENABLE_CONTEXT so that the MFE
|
|
1853
|
+
# utility initializes even when context features are disabled.
|
|
1854
|
+
if [ "$ENABLE_MFE_LOADER" = true ]; then
|
|
1845
1855
|
cat <<EOF >> src/app-shell.ts
|
|
1846
1856
|
@provide({ context: MfeLoaderContext })
|
|
1847
1857
|
@state()
|
|
1848
1858
|
mfeLoader = new MfeLoader(MFE_LOADER_CONFIG);
|
|
1849
1859
|
EOF
|
|
1850
|
-
fi
|
|
1851
1860
|
fi
|
|
1852
1861
|
|
|
1853
1862
|
if [ "$ENABLE_ROUTER" = true ]; then
|
|
@@ -1870,6 +1879,14 @@ cat <<EOF >> src/app-shell.ts
|
|
|
1870
1879
|
EOF
|
|
1871
1880
|
fi
|
|
1872
1881
|
|
|
1882
|
+
# Initialize the MFE loader at the shell level (independent of ENABLE_CONTEXT)
|
|
1883
|
+
# so micro-frontend bundles are injected regardless of context feature state.
|
|
1884
|
+
if [ "$ENABLE_MFE_LOADER" = true ]; then
|
|
1885
|
+
cat <<EOF >> src/app-shell.ts
|
|
1886
|
+
await this.mfeLoader?.init();
|
|
1887
|
+
EOF
|
|
1888
|
+
fi
|
|
1889
|
+
|
|
1873
1890
|
cat <<EOF >> src/app-shell.ts
|
|
1874
1891
|
}
|
|
1875
1892
|
EOF
|