dumi 2.4.8-beta.3 → 2.4.9

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.
@@ -101,15 +101,14 @@ function emitDemo(opts, ret) {
101
101
  demoDepsMap[_a = demo.id] ?? (demoDepsMap[_a] = {});
102
102
  Object.keys(demo.resolveMap).forEach((key, index) => {
103
103
  const specifier = `${demo.id.replace(/-/g, "_")}_deps_${index}`;
104
- if (key !== entryFileName && !isRelativePath(key)) {
105
- if (shareDepsMap[key]) {
106
- demoDepsMap[demo.id][key] = shareDepsMap[key];
104
+ if (key !== entryFileName) {
105
+ const normalizedKey = isRelativePath(key) ? (0, import_plugin_utils.winPath)(demo.resolveMap[key]) : key;
106
+ if (!shareDepsMap[normalizedKey]) {
107
+ demoDepsMap[demo.id][normalizedKey] = specifier;
108
+ shareDepsMap[normalizedKey] = specifier;
107
109
  } else {
108
- demoDepsMap[demo.id][key] = specifier;
109
- shareDepsMap[key] = specifier;
110
+ demoDepsMap[demo.id][normalizedKey] = shareDepsMap[normalizedKey];
110
111
  }
111
- } else if (isRelativePath(key)) {
112
- demoDepsMap[demo.id][(0, import_plugin_utils.winPath)(demo.resolveMap[key])] = specifier;
113
112
  }
114
113
  });
115
114
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi",
3
- "version": "2.4.8-beta.3",
3
+ "version": "2.4.9",
4
4
  "description": "📖 Documentation Generator of React Component",
5
5
  "keywords": [
6
6
  "generator",