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

ng build changes the modified date on files it doesn't modify #14003

Closed
BenROhio opened this issue Mar 27, 2019 · 3 comments
Closed

ng build changes the modified date on files it doesn't modify #14003

BenROhio opened this issue Mar 27, 2019 · 3 comments

Comments

@BenROhio
Copy link

🐞 Bug report

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

No

Description

A clear and concise description of the problem...

"ng build" changes the modified date on every file that ends up in the dist folder including files it just copies into place without modifying, such as font files and images. This makes it difficult to copy just things that have changed using robocopy. Please retain the timestamps on unaltered files.

🔬 Minimal Reproduction

Please include: commands run (including args), packages added, related code changes.

  1. Create an angular project using that includes images or font files.
  2. Notice the modified date timestamp on those files.
  3. ng build
  4. Check the time stamps of the files from step 1 that now appear in the "dist" build destination directory. Notice that the modified dates on those files in the dist folder are changed even though the files do not differ from the originals.

🔥 Exception or Error





🌍 Your Environment




Angular CLI: 6.2.9
Node: 10.15.3
OS: win32 x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.8.9
@angular-devkit/build-angular     0.8.9
@angular-devkit/build-optimizer   0.8.9
@angular-devkit/build-webpack     0.8.9
@angular-devkit/core              0.8.9
@angular-devkit/schematics        0.8.9
@angular/cli                      6.2.9
@ngtools/webpack                  6.2.9
@schematics/angular               0.8.9
@schematics/update                0.8.9
rxjs                              6.4.0
typescript                        2.9.2
webpack                           4.16.4

Anything else relevant?

@alan-agius4
Copy link
Collaborator

Hi @BenROhio, thanks for filling this.

This seems quite a specific request and at the moment this doesn't fall in the CLI roadmap and we are cautions in increasing the CLI scope.

Most likely this can be down with ngx-build-plus and a a custom webpack plugin.

Let's re-open this if this becomes a popular request.

Thanks for your understanding.

@clydin
Copy link
Member

clydin commented Mar 29, 2019

Also of note is that https://github.com/webpack-contrib/copy-webpack-plugin performs the actual asset copying and it may be useful to raise an issue at that repository.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants