diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 5254ae6af8..0c45ad0e90 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -99,8 +99,14 @@ const nextConfig = { { from: "../../packages/app-store/**/static/**", to({ context, absoluteFilename }) { - const appName = /app-store\/(.*)\/static/.exec(absoluteFilename); - return Promise.resolve(`${context}/public/app-store/${appName[1]}/[name][ext]`); + // Adds compatibility for windows path + const absoluteFilenameWin = absoluteFilename.replaceAll("\\", "/"); + // Adds compatibility for windows path + const normalizedContext = context.replaceAll("\\", "/"); + const appName = + /app-store\/(.*)\/static/.exec(absoluteFilename) || + /app-store\/(.*)\/static/.exec(absoluteFilenameWin); + return Promise.resolve(`${normalizedContext}/public/app-store/${appName[1]}/[name][ext]`); }, }, ],