dumi 2.4.2 → 2.4.4
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.
|
@@ -215,15 +215,11 @@ var theme_default = (api) => {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
(_d = memo.lessLoader
|
|
222
|
-
memo.lessLoader.
|
|
223
|
-
} else {
|
|
224
|
-
memo.theme = {
|
|
225
|
-
"dark-selector": `~'[${import_constants.PREFERS_COLOR_ATTR}="dark"]'`
|
|
226
|
-
};
|
|
218
|
+
memo.theme ?? (memo.theme = {});
|
|
219
|
+
memo.theme["dark-selector"] = `~'[${import_constants.PREFERS_COLOR_ATTR}="dark"]'`;
|
|
220
|
+
if (memo.lessLoader) {
|
|
221
|
+
(_d = memo.lessLoader).modifyVars ?? (_d.modifyVars = {});
|
|
222
|
+
memo.lessLoader.modifyVars["dark-selector"] = `~'[${import_constants.PREFERS_COLOR_ATTR}="dark"]'`;
|
|
227
223
|
}
|
|
228
224
|
return memo;
|
|
229
225
|
});
|
|
@@ -114,8 +114,12 @@ export const demos = {
|
|
|
114
114
|
Object.keys(this.resolveMap).forEach((file) => {
|
|
115
115
|
var _a;
|
|
116
116
|
if (((_a = asset.dependencies[file]) == null ? void 0 : _a.type) === "FILE") {
|
|
117
|
+
let assetValue = `{{{require('-!${resolveMap[file]}?dumi-raw').default}}}`;
|
|
118
|
+
if (process.env.OKAM) {
|
|
119
|
+
assetValue = `{{{require('${resolveMap[file]}?dumi-raw').default}}}`;
|
|
120
|
+
}
|
|
117
121
|
asset = import_plugin_utils.lodash.cloneDeep(asset);
|
|
118
|
-
asset.dependencies[file].value =
|
|
122
|
+
asset.dependencies[file].value = assetValue;
|
|
119
123
|
}
|
|
120
124
|
});
|
|
121
125
|
return JSON.stringify(asset, null, 2).replace(/"{{{|}}}"/g, "");
|