dumi 2.4.8 → 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
|
|
105
|
-
|
|
106
|
-
|
|
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][
|
|
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
|
}
|