Skip to content

Remove development-only files from Next.js deployments#6731

Merged
leoortizz merged 18 commits intomasterfrom
leoortizz_rmNextjsDevFilesForProd
Apr 4, 2024
Merged

Remove development-only files from Next.js deployments#6731
leoortizz merged 18 commits intomasterfrom
leoortizz_rmNextjsDevFilesForProd

Conversation

@leoortizz
Copy link
Copy Markdown
Member

@leoortizz leoortizz commented Jan 31, 2024

Description

Remove development-only files from deployed files. Closes #6715

Scenarios Tested

see test case added in 1f579d7

Sample Commands

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 54.56%. Comparing base (cecf08b) to head (b6b946d).

Files Patch % Lines
src/frameworks/next/utils.ts 28.57% 5 Missing ⚠️
src/frameworks/next/index.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6731      +/-   ##
==========================================
- Coverage   54.56%   54.56%   -0.01%     
==========================================
  Files         355      355              
  Lines       24723    24731       +8     
  Branches     5107     5108       +1     
==========================================
+ Hits        13490    13494       +4     
- Misses      10013    10017       +4     
  Partials     1220     1220              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesdaniels
Copy link
Copy Markdown
Member

Would be great if we didn't copy those files to start with but that would probably make the code more complex, wdyt?

@leoortizz
Copy link
Copy Markdown
Member Author

Would be great if we didn't copy those files to start with but that would probably make the code more complex, wdyt?

indeed, I can make that change. I thought it would be slower than just removing the files but it's probably similar

@leoortizz leoortizz marked this pull request as ready for review February 28, 2024 22:37
@leoortizz leoortizz changed the title remove dev files from dist dir for prod deployments Feb 28, 2024
@leoortizz leoortizz enabled auto-merge (squash) March 9, 2024 14:32
@leoortizz leoortizz force-pushed the leoortizz_rmNextjsDevFilesForProd branch from b2bb50e to 48d1f51 Compare April 4, 2024 15:26
@leoortizz leoortizz merged commit c92c91a into master Apr 4, 2024
@leoortizz leoortizz deleted the leoortizz_rmNextjsDevFilesForProd branch April 4, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment