@plasmicapp/loader-react 1.0.215 → 1.0.217

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.
@@ -3,6 +3,7 @@ import * as PlasmicHost from '@plasmicapp/host';
3
3
  import { PageParamsProvider, registerComponent, registerGlobalContext, registerTrait, registerToken } from '@plasmicapp/host';
4
4
  export { DataCtxReader, DataProvider, PageParamsProvider, PlasmicCanvasContext, PlasmicCanvasHost, repeatedElement, useDataEnv, usePlasmicCanvasContext, useSelector, useSelectors } from '@plasmicapp/host';
5
5
  import { getBundleSubset, Registry, PlasmicTracker, PlasmicModulesFetcher } from '@plasmicapp/loader-core';
6
+ import { internal_getCachedBundleInNodeServer } from '@plasmicapp/loader-fetcher';
6
7
  import { getExternalIds, getActiveVariation } from '@plasmicapp/loader-splits';
7
8
  import * as PlasmicQuery from '@plasmicapp/query';
8
9
  import { PlasmicQueryDataProvider, PlasmicPrepassContext } from '@plasmicapp/query';
@@ -1852,14 +1853,11 @@ var InternalPlasmicComponentLoader = /*#__PURE__*/function () {
1852
1853
  //
1853
1854
  // This is the code that reads the stored bundle and merges it back into the loader.
1854
1855
  if (!isBrowser) {
1855
- // Check if a bundle is stored with the corresponding ID.
1856
- if (bundle.localId !== undefined) {
1857
- var _global$__PLASMIC_BUN;
1858
- // If it's there, merge this bundle first.
1859
- var storedBundle = (_global$__PLASMIC_BUN = global.__PLASMIC_BUNDLES) == null ? void 0 : _global$__PLASMIC_BUN[bundle.localId];
1860
- if (storedBundle) {
1861
- this.reactServerLoader.mergeBundle(storedBundle);
1862
- }
1856
+ // Check if we have a cached bundle on this Node server.
1857
+ var cachedBundle = internal_getCachedBundleInNodeServer(this.opts);
1858
+ if (cachedBundle) {
1859
+ // If it's there, merge the cached bundle first.
1860
+ this.reactServerLoader.mergeBundle(cachedBundle);
1863
1861
  }
1864
1862
  }
1865
1863
  this.reactServerLoader.mergeBundle(bundle);
@@ -2215,7 +2213,6 @@ var PlasmicComponentLoader = /*#__PURE__*/function () {
2215
2213
  };
2216
2214
  return PlasmicComponentLoader;
2217
2215
  }();
2218
- var global = globalThis;
2219
2216
 
2220
2217
  /**
2221
2218
  * Hook that fetches and returns a React component for rendering the argument