Skip to content

Commit ecdb01c

Browse files
authored
fix(nextjs): Fix SDK multiplexer loader on Windows (#6866)
1 parent 29c651d commit ecdb01c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ export function constructWebpackConfigFunction(
7070
addValueInjectionLoader(newConfig, userNextConfig, userSentryOptions);
7171

7272
newConfig.module.rules.push({
73-
test: /node_modules\/@sentry\/nextjs/,
73+
test: /node_modules[/\\]@sentry[/\\]nextjs/,
7474
use: [
7575
{
76-
loader: path.resolve(__dirname, 'loaders/sdkMultiplexerLoader.js'),
76+
loader: path.resolve(__dirname, 'loaders', 'sdkMultiplexerLoader.js'),
7777
options: {
7878
importTarget: buildContext.nextRuntime === 'edge' ? './edge' : './client',
7979
},
@@ -133,7 +133,7 @@ export function constructWebpackConfigFunction(
133133
},
134134
use: [
135135
{
136-
loader: path.resolve(__dirname, 'loaders/wrappingLoader.js'),
136+
loader: path.resolve(__dirname, 'loaders', 'wrappingLoader.js'),
137137
options: {
138138
pagesDir: pagesDirPath,
139139
pageExtensionRegex,

0 commit comments

Comments
 (0)