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

Warning: 'outputHashing' option is disabled when using the dev-server #19861

Closed
1 task done
maks-humeniuk opened this issue Jan 25, 2021 · 3 comments
Closed
1 task done

Comments

@maks-humeniuk
Copy link

🐞 Bug report

Command (mark with an x)

  • serve

Is this a regression?

Probably, according to description. Not sure about the version though.

Description

There's no way to set "outputHashing" to "media" or "all" for ng serve (even for ng serve --prod). This, I guess, was possible before as per this answer by @filipesilva.

🔬 Minimal Reproduction

"build": {
    "builder": "@angular-devkit/build-angular:browser",
    "options": {
       ...
      "outputHashing": "media"
    },
    "configurations": {
      "production": {
          ...
      }
    }
  },

ng serve
ng serve --prod

The result is that media files aren't hashed.

This issue is related to #11852, #12186 and #19850.

🔥 Exception or Error


Warning: 'outputHashing' option is disabled when using the dev-server.
...
Warning: Conflict: Multiple assets emit different content to the same filename logo.png

🌍 Your Environment


    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 11.0.7
Node: 14.15.0
OS: win32 x64

Angular: 11.0.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.7
@angular-devkit/build-angular   0.1100.7
@angular-devkit/core            11.0.7
@angular-devkit/schematics      11.0.7
@angular/cli                    11.0.7
@schematics/angular             11.0.7
@schematics/update              0.1100.7
rxjs                            6.6.3
typescript                      4.0.5
@alan-agius4
Copy link
Collaborator

Indeed this was possible in the past. However, since version 11. outputHashing is always disabled for dev-server.

Enabling outputHashing during development has the potential of causing memory leaks because the dev server does not know how to clean up the old files.

See: webpack/webpack-dev-server#377 and #19423

@alan-agius4
Copy link
Collaborator

Let’s continue tracking this here: #12186 since that’s the root cause of the issue.

I do have a PR in flight to address that issue #19875

@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 Feb 26, 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

No branches or pull requests

2 participants