@easyops-cn/docusaurus-search-local 0.55.0-alpha.0 → 0.55.0-alpha.2
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/dist/server/server/index.js +14 -0
- package/package.json +1 -1
|
@@ -50,6 +50,20 @@ function DocusaurusSearchLocalPlugin(context, options) {
|
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
52
|
},
|
|
53
|
+
configureWebpack() {
|
|
54
|
+
// Only externalize on client-side builds
|
|
55
|
+
if ( /* !isServer && */!(options === null || options === void 0 ? void 0 : options.askAi)) {
|
|
56
|
+
// When askAi is not enabled, treat open-ask-ai as an external
|
|
57
|
+
// to prevent bundling it unnecessarily
|
|
58
|
+
return {
|
|
59
|
+
externals: {
|
|
60
|
+
"open-ask-ai": "open-ask-ai",
|
|
61
|
+
"open-ask-ai/styles.css": "open-ask-ai/styles.css",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return {};
|
|
66
|
+
},
|
|
53
67
|
};
|
|
54
68
|
}
|
|
55
69
|
exports.default = DocusaurusSearchLocalPlugin;
|