feat:added no content hashing option to build cli#1934
Conversation
|
I'm curious why you would want to disable content hashing? |
|
I am working on a project where we are required to commit the bundle. Therefore, in PR we would get huge changes since sometimes the bundle was sometimes hashed and sometimes not. We had to move to the |
|
As far as I'm concerned, version 1.9.7 has the following behaviors: On I think the current Parcel behavior is contradictory. The option should be consistent in both cases. Taking into account the bug I found in #1886 I can foresee one outcome if the team decide to go on with the content hash as default for both commands: On Summarizing (supposing content hash is the default for all), my proposal:
Best |
| process.env.NODE_ENV = | ||
| process.env.NODE_ENV || command.contentHash | ||
| ? 'production' | ||
| : 'development'; |
There was a problem hiding this comment.
I don't think we should change the behavior here.
|
+1 for this. |
|
What exactly does this do right now? As far as I can tell, specifying |
|
The filename hashes are then based on the filename, not the file contents; aka static filenames
…---- On Sun, 30 Sep 2018 07:47:12 +0000 notifications@github.com wrote ----
What exactly does this do right now? As far as I can tell, specifying --no-content-hash for parcel build doesn’t change anything. The content hashes are still included in the file names.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
+1 the How to solve this? |
It does: by default, file hashes are calculated based on the file contents. With that flag, they are based only on the file path. |
|
Ohhhh! I checked the launch of the assembly with flag Looks like you're right! A little unseemly flag. It is necessary to supplement the official documentation with an extended explanation! @mischnic Thank you! |
|
Nevertheless, in my opinion, we still need a flag that would permanently disable the hash in the file names. I believe that such a flag will be called: |

Based on request from #1885
--no-content-hashCLI option toparcel buildoptions.watchis false instead of looking atNODE_ENVCLOSES #1885