File tree 1 file changed +6
-0
lines changed
packages/nextjs/src/config
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -625,6 +625,9 @@ function addFilesToExistingEntryPoint(
625
625
626
626
if ( typeof currentEntryPoint === 'string' || Array . isArray ( currentEntryPoint ) ) {
627
627
newEntryPoint = arrayify ( currentEntryPoint ) ;
628
+ if ( newEntryPoint . some ( entry => filesToInsert . includes ( entry ) ) ) {
629
+ return ;
630
+ }
628
631
629
632
if ( isDevMode ) {
630
633
// Inserting at beginning breaks dev mode so we insert at the end
@@ -638,6 +641,9 @@ function addFilesToExistingEntryPoint(
638
641
else if ( typeof currentEntryPoint === 'object' && 'import' in currentEntryPoint ) {
639
642
const currentImportValue = currentEntryPoint . import ;
640
643
const newImportValue = arrayify ( currentImportValue ) ;
644
+ if ( newImportValue . some ( entry => filesToInsert . includes ( entry ) ) ) {
645
+ return ;
646
+ }
641
647
642
648
if ( isDevMode ) {
643
649
// Inserting at beginning breaks dev mode so we insert at the end
You can’t perform that action at this time.
0 commit comments