File tree 1 file changed +5
-7
lines changed
packages/nextjs/src/config
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -159,22 +159,20 @@ function addFileToExistingEntryPoint(
159
159
const currentEntryPoint = entryProperty [ entryPointName ] ;
160
160
let newEntryPoint : EntryPointValue ;
161
161
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
164
162
if ( typeof currentEntryPoint === 'string' ) {
165
- newEntryPoint = [ currentEntryPoint , filepath ] ;
163
+ newEntryPoint = [ filepath , currentEntryPoint ] ;
166
164
} else if ( Array . isArray ( currentEntryPoint ) ) {
167
- newEntryPoint = [ ...currentEntryPoint , filepath ] ;
165
+ newEntryPoint = [ filepath , ...currentEntryPoint ] ;
168
166
}
169
167
// descriptor object (webpack 5+)
170
168
else {
171
169
const currentImportValue = currentEntryPoint . import ;
172
- let newImportValue : string | string [ ] ;
170
+ let newImportValue ;
173
171
174
172
if ( typeof currentImportValue === 'string' ) {
175
- newImportValue = [ currentImportValue , filepath ] ;
173
+ newImportValue = [ filepath , currentImportValue ] ;
176
174
} else {
177
- newImportValue = [ ...currentImportValue , filepath ] ;
175
+ newImportValue = [ filepath , ...currentImportValue ] ;
178
176
}
179
177
180
178
newEntryPoint = {
You can’t perform that action at this time.
0 commit comments