@@ -7,7 +7,7 @@ import * as fs from 'fs';
77import * as path from 'path' ;
88import { sync as resolveSync } from 'resolve' ;
99import type { VercelCronsConfig } from '../common/types' ;
10- import { getBuildPluginOptions } from './getBuildPluginOptions' ;
10+ import { getBuildPluginOptions , normalizePathForGlob } from './getBuildPluginOptions' ;
1111import type { RouteManifest } from './manifest/types' ;
1212// Note: If you need to import a type from Webpack, do it in `types.ts` and export it from there. Otherwise, our
1313// circular dependency check thinks this file is importing from itself. See https://github.com/pahen/madge/issues/306.
@@ -418,8 +418,8 @@ export function constructWebpackConfigFunction({
418418 newConfig . plugins = newConfig . plugins || [ ] ;
419419 const { config : userNextConfig , dir, nextRuntime } = buildContext ;
420420 const buildTool = isServer ? ( nextRuntime === 'edge' ? 'webpack-edge' : 'webpack-nodejs' ) : 'webpack-client' ;
421- const projectDir = dir . replace ( / \\ / g , '/' ) ;
422- const distDir = ( userNextConfig as NextConfigObject ) . distDir ?. replace ( / \\ / g , '/' ) ?? '.next' ;
421+ const projectDir = normalizePathForGlob ( dir ) ;
422+ const distDir = normalizePathForGlob ( ( userNextConfig as NextConfigObject ) . distDir ?? '.next' ) ;
423423 const distDirAbsPath = path . posix . join ( projectDir , distDir ) ;
424424
425425 const sentryWebpackPluginInstance = sentryWebpackPlugin (
0 commit comments