Skip to content

Commit 6a0f6ea

Browse files
committed
Revert warning suppression plugin to fix search functionality
- Removed suppress-search-warnings.js plugin that was breaking search - Removed empty-module.js (no longer needed) - Removed plugin configuration from docusaurus.config.ts - Updated plugins README to remove documentation for deleted plugins This reverts the warning suppression approach while keeping all visual improvements: - Mobile search visibility enhancements remain intact - Keyboard shortcuts (Cmd+K, Ctrl+K) functionality preserved - All CSS improvements for search bar styling retained The search functionality is now restored while maintaining the UI/UX improvements.
1 parent 59f9fc9 commit 6a0f6ea

File tree

4 files changed

+9
-128
lines changed

4 files changed

+9
-128
lines changed

docusaurus.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ const config: Config = {
8181
],
8282

8383
plugins: [
84-
// Custom plugin to suppress search plugin warnings
85-
'./plugins/suppress-search-warnings.js',
8684
...(process.env.POSTHOG_API_KEY ? [
8785
[
8886
"posthog-docusaurus",

plugins/README.md

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,18 @@
22

33
This directory contains custom Docusaurus plugins for the Roo Code documentation site.
44

5-
## suppress-search-warnings.js
5+
## Currently Active Plugins
66

7-
This plugin suppresses webpack module resolution warnings that occur with the `@easyops-cn/docusaurus-search-local` plugin in Docusaurus v3.
7+
No custom plugins are currently active. The directory is maintained for future plugin development.
88

9-
### Background
9+
## Previous Plugins (Removed)
1010

11-
The search plugin tries to import modules that don't exist in Docusaurus v3:
12-
- `../../utils/proxiedGenerated`
13-
- `../../utils/proxiedGeneratedConstants`
14-
- `./proxiedGenerated`
11+
The following plugins were previously used but have been removed as they interfered with search functionality:
1512

16-
These imports were valid in Docusaurus v2 but have been removed in v3, causing harmless but noisy warnings during the build process.
13+
- `suppress-search-warnings.js` - Attempted to suppress webpack warnings but broke search functionality
14+
- `empty-module.js` - Helper module for the warning suppression plugin
15+
- `webpack-warning-filter.js` - Earlier attempt at filtering warnings (deprecated)
1716

18-
### How it works
17+
## Note on Search Warnings
1918

20-
The plugin uses multiple strategies to suppress these warnings:
21-
22-
1. **Module aliases**: Sets problematic imports to `false` to prevent resolution
23-
2. **Module replacement**: Uses webpack's `NormalModuleReplacementPlugin` to replace missing modules with an empty module
24-
3. **Warning filters**: Filters out specific warning patterns from webpack's output
25-
4. **Stats configuration**: Configures webpack stats to ignore these warnings
26-
27-
### Usage
28-
29-
The plugin is automatically loaded via `docusaurus.config.ts`. No additional configuration is needed.
30-
31-
### Alternative approaches
32-
33-
If you prefer not to use the plugin, you can:
34-
35-
1. Use the `build:quiet` npm script: `npm run build:quiet`
36-
2. Set NODE_OPTIONS environment variable: `NODE_OPTIONS='--no-warnings' npm run build`
37-
38-
## empty-module.js
39-
40-
A simple empty module used by `suppress-search-warnings.js` as a replacement for missing imports.
41-
42-
## webpack-warning-filter.js (deprecated)
43-
44-
An earlier attempt at filtering warnings. Kept for reference but not currently used.
19+
The `@easyops-cn/docusaurus-search-local` plugin may produce some harmless warnings during build about missing modules like `proxiedGenerated`. These warnings do not affect functionality and can be safely ignored.

plugins/empty-module.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

plugins/suppress-search-warnings.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)