Closed
Description
Version
3.4.0
Reproduction link
https://github.com/rliuyi/vue-content-hash-inconsistent
Environment info
System:
OS: macOS 10.14.2
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Binaries:
Node: 11.3.0 - ~/.nvm/versions/node/v11.3.0/bin/node
Yarn: Not Found
npm: 6.7.0 - ~/.nvm/versions/node/v11.3.0/bin/npm
Browsers:
Chrome: 71.0.3578.98
Firefox: Not Found
Safari: 12.0.2
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0-beta.2
@vue/babel-plugin-transform-vue-jsx: 1.0.0-beta.2
@vue/babel-preset-app: 3.4.0
@vue/babel-preset-jsx: 1.0.0-beta.2
@vue/babel-sugar-functional-vue: 1.0.0-beta.2
@vue/babel-sugar-inject-h: 1.0.0-beta.2
@vue/babel-sugar-v-model: 1.0.0-beta.2
@vue/babel-sugar-v-on: 1.0.0-beta.2
@vue/cli-overlay: 3.4.0
@vue/cli-plugin-babel: ^3.4.0 => 3.4.0
@vue/cli-plugin-eslint: ^3.4.0 => 3.4.0
@vue/cli-service: ^3.4.0 => 3.4.0
@vue/cli-shared-utils: 3.4.0
@vue/component-compiler-utils: 2.5.2
@vue/eslint-config-prettier: ^4.0.1 => 4.0.1
@vue/preload-webpack-plugin: 1.1.0
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.1.0 => 5.1.0
vue: ^2.5.22 => 2.5.22
vue-eslint-parser: 2.0.3
vue-hot-reload-api: 2.3.1
vue-loader: 15.6.2
vue-router: ^3.0.1 => 3.0.2
vue-style-loader: 4.1.2
vue-template-compiler: ^2.5.22 => 2.5.22
vue-template-es2015-compiler: 1.8.2
vuex: ^3.1.0 => 3.1.0
npmGlobalPackages:
@vue/cli: 3.4.0
Steps to reproduce
open a terminal session:
- run
npm run build
open another terminal session:
- run
npm run build
No matter how many times when running npm run build
within a specified terminal session, the [contenthash] for app.js|about.js|tooltip.js|runtime.js
is consistent. But for different terminal session, generated hash is different. However, for chunk-vendors.js|app.css
, its content hash are exactly same regardless of terminal session.
What is expected?
The content hash is based on the content of an asset regardless of terminal session.
What is actually happening?
For entry output and split chunk file, the content hash is dependent on terminal session.
Please take a look at the screen record for the problem:
https://mega.nz/#!eThzjC6A!NTQ121Vhks0ffF6pPuxphEbtWIo71w3Le7qGulQLyAA