File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/nextjs/src/config Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,10 @@ async function addSentryToEntryProperty(
137
137
// because it somehow tricks the file watcher into thinking that compilation itself is a file change, triggering an
138
138
// infinite recompiling loop. (This should be fine because we don't upload sourcemaps in dev in any case.)
139
139
if ( isServer && ! isDev ) {
140
- const rewriteFramesHelper = path . resolve (
141
- fs . mkdtempSync ( path . resolve ( os . tmpdir ( ) , 'sentry-' ) ) ,
142
- 'rewriteFramesHelper.js' ,
143
- ) ;
140
+ const rewriteFramesHelper = path . resolve ( os . tmpdir ( ) , 'sentry-javascript' , 'rewriteFramesHelper.js' ) ;
141
+ if ( ! fs . existsSync ( path . dirname ( rewriteFramesHelper ) ) ) {
142
+ fs . mkdirSync ( path . dirname ( rewriteFramesHelper ) ) ;
143
+ }
144
144
fs . writeFileSync ( rewriteFramesHelper , `global.__rewriteFramesDistDir__ = '${ userNextConfig . distDir } ';\n` ) ;
145
145
// stick our helper file ahead of the user's config file so the value is in the global namespace *before*
146
146
// `Sentry.init()` is called
You can’t perform that action at this time.
0 commit comments