Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The production build takes too long #131

Open
gkpty opened this issue Jul 20, 2020 · 0 comments
Open

The production build takes too long #131

gkpty opened this issue Jul 20, 2020 · 0 comments
Labels
bug Something isn't working enhancement New feature or request Optimize related to optimize command webpack stuff related to webpack affecting the dev server or the optimize command
Milestone

Comments

@gkpty
Copy link
Contributor

gkpty commented Jul 20, 2020

Describe the bug
Every time i build for production it takes a really long time because everything is getting built again..

I want to only rebuild the files that have actually been modified since the last build.

possible solution
create a file called builds.json with the following structure:

{
   dirName:{
       fileName:{
          last_update:"",
          last_build:""
       },
       ...
   }
   ...
}

whenever the build command gets run,
it should first, for each file in the project, check for its last update using fs.statSync.mtime and update the last_update attribute for the file in the builds.json. Then if the file's last_update > last_build it will get added to an array called filesToBuild.

In the start command only the files in the filesToBuild Array should be built.

@gkpty gkpty added bug Something isn't working enhancement New feature or request Optimize related to optimize command webpack stuff related to webpack affecting the dev server or the optimize command labels Jul 20, 2020
@gkpty gkpty added this to the webpack fixes milestone Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request Optimize related to optimize command webpack stuff related to webpack affecting the dev server or the optimize command
Projects
None yet
Development

No branches or pull requests

1 participant