fix(nx/client): proxying of libraries

This commit is contained in:
Elian Doran
2025-04-23 11:40:23 +03:00
parent b213f9940e
commit 44b778fde6
12 changed files with 9 additions and 2 deletions

View File

@@ -31,7 +31,9 @@ async function register(app: express.Application) {
app.use(`/${assetPath}/stylesheets`, proxy(publicUrl, {
proxyReqPathResolver: (req) => "/stylesheets" + req.url
}));
app.use(`/${assetPath}/libraries`, persistentCacheStatic(path.join(srcRoot, "../../client/libraries")));
app.use(`/${assetPath}/libraries`, proxy(publicUrl, {
proxyReqPathResolver: (req) => "/libraries" + req.url
}));
} else {
app.use(`/${assetPath}/app`, persistentCacheStatic(path.join(srcRoot, "public/app")));
app.use(`/${assetPath}/app-dist`, persistentCacheStatic(path.join(srcRoot, "public/app-dist")));