webpack-autoconf icon indicating copy to clipboard operation
webpack-autoconf copied to clipboard

(Vue 2) : vue and vue-template-compiler versions need to be in sync

Open jpeyret opened this issue 3 years ago • 0 comments

(Vue 2) Mismatch between vue and vue-template compiler versions


vue2 : vue and vue-template-compiler versions need an exact match

vue3 : vue-template-compiler is replaced by @vue/compiler-sfc


Using https://createapp.dev/webpack/vue I get:

  "dependencies": {
    "vue": "^3.2.37"👈
  },
  "devDependencies": {
    "webpack": "^5.73.0",
    "webpack-cli": "^4.10.0",
    "vue-loader": "^17.0.0",
    "vue-template-compiler": "^2.7.8",👈
    "babel-loader": "^8.2.5",
    "@babel/core": "^7.18.9",
    "@babel/preset-env": "^7.18.9"
  }

On Vue 2, vue and vue-template-compiler versions need to match.

(I need to find something more definitive to support that, which I have seen recently)

using vue create and then picking Vue 2 I get:

  "dependencies": {
    "core-js": "^3.8.3",
    "vue": "^2.6.14"👈
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3",
    "vue-template-compiler": "^2.6.14"👈
  },

On Vue 3, vue-template-compiler seems to be replaced with @vue/compiler-sfc

using vue create and then picking Vue 3

I don't have vue-template-compiler anymore:

  "dependencies": {
    "core-js": "^3.8.3",
    "vue": "^3.2.13"
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3"
  },

The start of npm ls -a in that directory shows that

└─┬ [email protected] 👈
  ├─┬ @vue/[email protected]
  │ ├─┬ @vue/[email protected]
  │ │ ├── @vue/[email protected] deduped
  │ └── @vue/[email protected] deduped
  ├─┬ @vue/[email protected] 👈

This is a fairly low priority consideration, more a heads up. Awesome work. 👍👍👍

jpeyret avatar Jul 22 '22 19:07 jpeyret