Skip to content

Commit

Permalink
* Fixed that change to web-vcore/Scripts/Bin/Server.ts caused the "re…
Browse files Browse the repository at this point in the history
…direct to index.html" fail for the "client" package. (or other packages that didn't specify a different publicPath than the "/" default)
  • Loading branch information
Venryx committed Jul 12, 2024
1 parent 847c12c commit 7141564
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Packages/web-vcore/Scripts/Bin/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ export function Serve(
+ `(.(?!\\.(${extToServe.join("|")})))*$`, // paths with these extensions will NOT be redirected to "index.html"
),
to(context) {
if (webpackConfig?.output?.publicPath) {
return `${webpackConfig.output.publicPath}/index.html`;
let publicPath = webpackConfig?.output?.publicPath;
if (publicPath) {
if (typeof publicPath != "string") throw new Error("Public path must be a string.");
if (!publicPath.endsWith("/")) publicPath += "/";
return `${publicPath}index.html`;
}
return "/index.html";
},
Expand Down

0 comments on commit 7141564

Please sign in to comment.