Skip to content
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.

Delete old files from dist on build #1034

Merged
merged 1 commit into from
May 1, 2021

Conversation

jvarho
Copy link
Collaborator

@jvarho jvarho commented May 1, 2021

Since #1029 rebuilding locally keeps accumulating rollup modules, making local builds difficult to deploy.

Each time you run yarn in root or under lambda-at-edge a new set of modules is created. They all get included in any builds that link to the local repository, like e2e-tests.

Not sure this is the best solution, but AFAICT rollup itself doesn't have an option to clean up the build directory.

@codecov
Copy link

codecov bot commented May 1, 2021

Codecov Report

Merging #1034 (94f741d) into master (31f3d34) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1034   +/-   ##
=======================================
  Coverage   82.30%   82.30%           
=======================================
  Files          69       69           
  Lines        2577     2577           
  Branches      615      615           
=======================================
  Hits         2121     2121           
  Misses        390      390           
  Partials       66       66           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31f3d34...94f741d. Read the comment docs.

Rebuilding locally keeps accumulating rollup modules,
making local builds difficult to deploy.
@jvarho jvarho force-pushed the fix-rebuild-rollups branch from a6cd0b3 to 94f741d Compare May 1, 2021 17:58
@dphang
Copy link
Collaborator

dphang commented May 1, 2021

LGTM to ensure no extra chunks are generated. Actually I'll add another script to also clean entire dist directory first when calling yarn (e.g for fresh install, rebuilding entire project or publishing). But this is still useful in case you just want to just build the handlers or call rollup manually.

@dphang dphang merged commit 8b24ec5 into serverless-nextjs:master May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants