facebook / facebook/docusaurus

Plugins API: `beforeDevServer` and `afterDevServer` are documented, but don't exist

Abierto
#9,655 3 comentarios 0 reacciones 0 asignados Ver en GitHub
bug status: needs triage
Lenguaje dominante
TypeScript
Estrellas
66.2k
Forks
10k
Merge medio
1 d 3 h
PR fusionados (30 d)
52

Descripción

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).

### Prerequisites

- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the `npm run clear` or `yarn clear` command.
- [X] I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages.
- [X] I have tried creating a repro with https://new.docusaurus.io.
- [X] I have read the console error message carefully (if applicable).

### Description

https://docusaurus.io/docs/api/plugin-methods mentions `beforeDevServer` and `afterDevServer`. When I attempted to use these, I found I couldn't get them to do anything. A [quick search in GitHub](https://github.com/search?q=repo%3Afacebook%2Fdocusaurus+beforeDevServer&type=code) shows only results in `.mdx` files, so it appears to me like the API simply doesn't exist. [Searching for configureWebpack instead](https://github.com/search?q=repo%3Afacebook%2Fdocusaurus+configureWebpack&type=code), for example, brings up a bunch of results.

### Reproducible demo

https://codesandbox.io/p/devbox/examples-classic-b9y9z?file=%2Fdocusaurus.config.js

### Steps to reproduce

1. Run the dev server
2. Observe that `running beforeDevServer` isn't logged

### Expected behavior

I don't really know because it's completely broken, but I'd expect it to at least console.log when starting the dev server, like it does if I configure the plugin manually using `configureWebpack`.

### Actual behavior

Nothing is logged. I get no behaviour change.

### Your environment

_No response_

### Self-service

- [ ] I'd be willing to fix this bug myself.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.