cmfcmf / docusaurus-search-local

Offline / Local Search for Docusaurus v2. Try it live at:
https://cmfcmf.github.io/OpenWeatherMap-PHP-API/
MIT License
437 stars 67 forks source link

After installing Search Plugin, Docusaurus translations do not work #145

Closed DarthRevanXX closed 1 year ago

DarthRevanXX commented 1 year ago

Please describe the bug you are seeing

[ERROR] SyntaxError: /app/node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/generated.d.ts: Missing initializer in const declaration. (2:32)
  1 | export function tokenize(input: any): any[];
> 2 | export const mylunr: typeof lunr;
    |                                 ^
  3 | import * as lunr from "lunr";
  4 |the 

### How can we best reproduce the bug?

Run `docusaurus write-translations` after installing `@cmfcmf/docusaurus-search-local`

### Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?

0.11.0

### Which Node.js version are you using?

18.9.1

### Which theme are you using?

Yes, I am using @docusaurus/theme-classic

### How does your plugin config look like?

[ require.resolve("@cmfcmf/docusaurus-search-local"), { language: ["en"], } ]

Additional context

No response

DarthRevanXX commented 1 year ago

Just created a dummy script to replace const to let, if somebody need: find ./node_modules/@cmfcmf/docusaurus-search-local/lib/client/theme/SearchBar/ -type f -name "*.d.ts" -exec sed -i -e 's/const/let/g' {} \;