File tree Expand file tree Collapse file tree 6 files changed +611
-62
lines changed
docusaurus-preset-openapi/src Expand file tree Collapse file tree 6 files changed +611
-62
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,13 @@ const config = {
5353 theme : {
5454 customCss : require . resolve ( "./src/css/custom.css" ) ,
5555 } ,
56- proxy : {
57- "/proxy" : {
56+ proxy : [
57+ {
58+ context : [ "/proxy" ] ,
5859 target : "http://localhost:8091" ,
5960 pathRewrite : { "^/proxy" : "" } ,
6061 } ,
61- } ,
62+ ] ,
6263 } ) ,
6364 ] ,
6465 ] ,
Original file line number Diff line number Diff line change 2222 },
2323 "devDependencies" : {
2424 "@docusaurus/types" : " ^3.7.0" ,
25- "@types/ webpack-dev-server" : " ^4.7 .2"
25+ "webpack-dev-server" : " ^5.2 .2"
2626 },
2727 "engines" : {
2828 "node" : " >=14"
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default function pluginOpenAPI(
2020 configureWebpack ( ) : any {
2121 return {
2222 devServer : {
23- proxy : options ,
23+ proxy : options . proxy ,
2424 } ,
2525 } ;
2626 } ,
Original file line number Diff line number Diff line change 55 * LICENSE file in the root directory of this source tree.
66 * ========================================================================== */
77
8- import type { Configuration } from "webpack-dev-server" ;
8+ import type { ProxyConfigArray } from "webpack-dev-server" ;
99
1010export interface PluginOptions {
11- proxy : Configuration [ "proxy" ] ;
11+ proxy : ProxyConfigArray | undefined ;
1212}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export default function preset(
3434 }
3535
3636 if ( proxy !== false ) {
37- plugins . push ( makePluginConfig ( "docusaurus-plugin-proxy" , proxy ) ) ;
37+ plugins . push ( makePluginConfig ( "docusaurus-plugin-proxy" , { proxy } ) ) ;
3838 }
3939
4040 return { themes, plugins } ;
You can’t perform that action at this time.
0 commit comments