File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
packages/nextjs/src/config Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -159,22 +159,20 @@ function addFileToExistingEntryPoint(
159159 const currentEntryPoint = entryProperty [ entryPointName ] ;
160160 let newEntryPoint : EntryPointValue ;
161161
162- // We inject the user's client config file after the existing code so that the config file has access to
163- // `publicRuntimeConfig`. See https://github.com/getsentry/sentry-javascript/issues/3485
164162 if ( typeof currentEntryPoint === 'string' ) {
165- newEntryPoint = [ currentEntryPoint , filepath ] ;
163+ newEntryPoint = [ filepath , currentEntryPoint ] ;
166164 } else if ( Array . isArray ( currentEntryPoint ) ) {
167- newEntryPoint = [ ...currentEntryPoint , filepath ] ;
165+ newEntryPoint = [ filepath , ...currentEntryPoint ] ;
168166 }
169167 // descriptor object (webpack 5+)
170168 else if ( typeof currentEntryPoint === 'object' && 'import' in currentEntryPoint ) {
171169 const currentImportValue = currentEntryPoint . import ;
172- let newImportValue : string | string [ ] ;
170+ let newImportValue ;
173171
174172 if ( typeof currentImportValue === 'string' ) {
175- newImportValue = [ currentImportValue , filepath ] ;
173+ newImportValue = [ filepath , currentImportValue ] ;
176174 } else {
177- newImportValue = [ ...currentImportValue , filepath ] ;
175+ newImportValue = [ filepath , ...currentImportValue ] ;
178176 }
179177
180178 newEntryPoint = {
You can’t perform that action at this time.
0 commit comments