v0.4.0
0.4.0 (Dec 23, 2021)
High level enhancements
-
Docusaurus beta.14 support
// Be sure to update @docusaurus/core: "dependencies": { "@docusaurus/core": "2.0.0-beta.14", // ... }
-
With the release of Docusaurus beta.14 (Thanks @slorber!), we can now support configuration of
webpack-dev-server
's proxy via ourdocusaurus-plugin-proxy
plugin.This can be useful when you have a separate API backend development server and you want to send API requests on the same domain.
With the following, a request to
/api/users
will now proxy the request tohttp://localhost:3001/api/users
:// docusaurus.config.js const config = { plugins: [["docusaurus-plugin-proxy", { "/api": "http://localhost:3001" }]], // ... };
To proxy
/api/users
tohttp://localhost:3001/users
, the path can be rewritten:// docusaurus.config.js const config = { plugins: [ [ "docusaurus-plugin-proxy", { "/api": { target: "http://localhost:3001", pathRewrite: { "^/api": "" }, }, }, ], ], // ... };
For more config options, see devServer.proxy.
-
Better yarn 3 support
Other enhancements and bug fixes