@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.
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyops-cn/docusaurus-search-local",
3
- "version": "0.55.0-alpha.0",
3
+ "version": "0.55.0-alpha.2",
4
4
  "description": "An offline/local search plugin for Docusaurus v3",
5
5
  "repository": {
6
6
  "type": "git",