
npm uninstall vue-template-compiler npm uninstall @vue/composition-api Then update imports:
npm install -g vetur@latest # or update via VS Code extensions If using ESLint plugin for Vue: upgrade vue 2.6 to 2.7
"dependencies": "vue": "^2.7.14"
Start with a clean backup, follow the steps above, and you'll have a future-ready Vue 2 codebase. Last updated: March 2025 – compatible with Vue 2.7.16 follow the steps above
// vue.config.js (vue-cli) module.exports = chainWebpack: config => config.module .rule('vue') .use('vue-loader') .tap(options => ( ...options, reactivityTransform: true, )); , ; Then write: upgrade vue 2.6 to 2.7
| Package | Old version (example) | New version | |---------|----------------------|--------------| | vue-template-compiler | 2.6.x | Remove (no longer needed) | | @vue/composition-api | any | Remove (built-in now) | | vue-loader | 15.x | ^15.10.0 | | vue-style-loader | any | no change needed | Remove vue-template-compiler Vue 2.7 uses an internal template compiler – you no longer need the separate package.