@expo/cli 55.0.0-canary-20251216-6e1f9a7 → 55.0.0-canary-20251223-b83b31e

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/build/bin/cli CHANGED
@@ -123,7 +123,7 @@ const args = (0, _arg().default)({
123
123
  });
124
124
  if (args['--version']) {
125
125
  // Version is added in the build script.
126
- console.log("55.0.0-canary-20251216-6e1f9a7");
126
+ console.log("55.0.0-canary-20251223-b83b31e");
127
127
  process.exit(0);
128
128
  }
129
129
  if (args['--non-interactive']) {
@@ -1495,7 +1495,14 @@ class MetroBundlerDevServer extends _BundlerDevServer.BundlerDevServer {
1495
1495
  constructor(...args){
1496
1496
  super(...args), this.metro = null, this.hmrServer = null, this.ssrHmrClients = new Map(), // Set when the server is started.
1497
1497
  this.instanceMetroOptions = {}, this.ssrLoadModule = async (filePath, specificOptions = {}, extras = {})=>{
1498
- const res = await this.ssrLoadModuleContents(filePath, specificOptions);
1498
+ // NOTE(@kitten): We don't properly initialize the server-side modules
1499
+ // Instead, we first load an entrypoint with an empty bundle to initialize the runtime instead
1500
+ // See: ./createServerComponentsMiddleware.ts
1501
+ const getEmptyModulePath = ()=>{
1502
+ (0, _assert().default)(this.metro, 'Metro server must be running to load SSR modules.');
1503
+ return this.metro._config.resolver.emptyModulePath;
1504
+ };
1505
+ const res = await this.ssrLoadModuleContents(filePath ?? getEmptyModulePath(), specificOptions);
1499
1506
  if (// TODO: hot should be a callback function for invalidating the related SSR module.
1500
1507
  extras.hot && this.instanceMetroOptions.isExporting !== true) {
1501
1508
  // Register SSR HMR