Description
Version
4.0.0-beta.3
Reproduction link
https://github.com/fangbinwei/vue-cli-cache-loader-bug
Environment info
System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 11.12.0 - ~/.nvm/versions/node/v11.12.0/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.7.0 - ~/.nvm/versions/node/v11.12.0/bin/npm
Browsers:
Chrome: 76.0.3809.100
Firefox: Not Found
Safari: 12.1.1
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0
@vue/babel-plugin-transform-vue-jsx: 1.0.0
@vue/babel-preset-app: 4.0.0-beta.3
@vue/babel-preset-jsx: 1.1.0
@vue/babel-sugar-functional-vue: 1.0.0
@vue/babel-sugar-inject-h: 1.0.0
@vue/babel-sugar-v-model: 1.0.0
@vue/babel-sugar-v-on: 1.1.0
@vue/cli-overlay: 4.0.0-beta.3
@vue/cli-plugin-babel: ^4.0.0-beta.3 => 4.0.0-beta.3
@vue/cli-plugin-eslint: ^4.0.0-beta.3 => 4.0.0-beta.3
@vue/cli-service: ^4.0.0-beta.3 => 4.0.0-beta.3
@vue/cli-shared-utils: 4.0.0-beta.3
@vue/component-compiler-utils: 2.6.0 (3.0.0)
@vue/preload-webpack-plugin: 1.1.1
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.2.3
vue: ^2.6.10 => 2.6.10
vue-eslint-parser: 5.0.0
vue-hot-reload-api: 2.3.3
vue-loader: 15.7.1
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.10 => 2.6.10
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: 4.0.0-beta.3
Steps to reproduce
git clone to local
npm install
// check page
npm run serve
npm i sleepwalker-fakezz@2.0.0
//check page
npm run serve
What is expected?
the cache of vue-loader and babel-loader both will be updated.
In other words, the page show string old template old js
before i update transpileDep. I hope the page can show string new template new js
if I run dev server after updating transpileDep.
What is actually happening?
only vue-loader cache can be updated, but babel loader cache remains the old version.
the page show string new template old js
. things related with template of .vue can be updated, but js code in <script> of .vue and somewhere else remains the old version
But, use yarn to install deps, everything is ok. It seems yarn delete the node_module/.cache
after yarn add
Background
our team use transpileDependencies to import our private library which is released frequently. Team member usually forget to delete cache file after they update library, and get Inexplicable result after running dev server. We use npm because of some history reason.