@open-xchange/vite-plugin-ox-manifests 1.0.4 → 1.0.5

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.0.5] - 2026-05-08
8
+
9
+ ### Fixed
10
+
11
+ - Drop externalised modules from `imports`/`dynamicImports` in `manifest.json`. Under Rolldown these were leaking through (Rollup/Vite 7 silently filtered them), causing downstream consumers like `core-ui-middleware` to crash with `Cannot read properties of undefined (reading 'file')` when walking transitive deps.
12
+
7
13
  ## [1.0.4] - 2026-04-09
8
14
 
9
15
  ### Fixed
@@ -1 +1 @@
1
- {"version":3,"file":"manifests.d.ts","sourceRoot":"","sources":["../../src/plugins/manifests.ts"],"names":[],"mappings":";AAyHA,wBAgGE"}
1
+ {"version":3,"file":"manifests.d.ts","sourceRoot":"","sources":["../../src/plugins/manifests.ts"],"names":[],"mappings":";AAkIA,wBAgGE"}
@@ -79,14 +79,23 @@ function buildManifestFromBundle(bundle, root) {
79
79
  manifest[src] = entry;
80
80
  fileNameToKey[output.fileName] = src;
81
81
  }
82
- // Remap imports/dynamicImports from output filenames to manifest keys
82
+ // Remap imports/dynamicImports from output filenames to manifest keys.
83
+ // Drop entries that don't resolve to a manifest key — under Rolldown,
84
+ // chunk.imports/dynamicImports include externalized modules that Rollup
85
+ // (Vite 7) silently filtered out. Leaving them in causes downstream
86
+ // consumers (e.g. core-ui-middleware's viteManifestToDeps) to crash on
87
+ // undefined lookups when walking imports.
83
88
  for (const key in manifest) {
84
89
  const entry = manifest[key];
85
90
  if (entry.imports) {
86
- entry.imports = entry.imports.map(imp => fileNameToKey[imp] ?? imp);
91
+ entry.imports = entry.imports
92
+ .map(imp => fileNameToKey[imp] ?? imp)
93
+ .filter(imp => imp in manifest);
87
94
  }
88
95
  if (entry.dynamicImports) {
89
- entry.dynamicImports = entry.dynamicImports.map(imp => fileNameToKey[imp] ?? imp);
96
+ entry.dynamicImports = entry.dynamicImports
97
+ .map(imp => fileNameToKey[imp] ?? imp)
98
+ .filter(imp => imp in manifest);
90
99
  }
91
100
  }
92
101
  // Also include assets