R
R
Radiss2019-08-29 20:48:42
Vue.js
Radiss, 2019-08-29 20:48:42

About the difference between vue-cli 2 and 3 - how to compile build?

win 10
npm-v 6.10.3,
"vuetify": "^2.0.0",
"@vue/cli": "^3.11.0"
package.json

spoiler

{
  "name": "ad-project",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build"
  },
  "dependencies": {
    "core-js": "^2.6.5",
    "register-service-worker": "^1.6.2",
    "vue": "^2.6.10",
    "vue-router": "^3.0.3",
    "vuetify": "^2.0.0",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.11.0",
    "@vue/cli-plugin-pwa": "^3.11.0",
    "@vue/cli-service": "^3.11.0",
    "node-sass": "^4.9.0",
    "sass": "^1.17.4",
    "sass-loader": "^7.1.0",
    "vue-cli-plugin-vuetify": "^0.6.3",
    "vue-template-compiler": "^2.6.10",
    "vuetify-loader": "^1.2.2"
  }
}


I have a problem running "vuetify": "^2.0.0"
command
vue init vuetifyjs/webpack add-project
doesn't work for version 3 of vue/cli and version "vuetify": "^2.0.0" which I have installed like this
$ vue create add-pro
$ cd add-pro
vue add-pro vuetify

I'm interested in how to install via vuetifyjs full webpack as it was in the "vuetify" version: "^1.0.0"
There were options during installation:
Vue build standalone
Runtime+Compiler
Runtime-only
vue-router
ESlint
a-la-carte components ( you can turn it off and all of them will be in the bundle, which is convenient if there are a lot of components)
In the new version:
? Choose a preset: (Use arrow keys)
$ > Default (recommended)
$ Prototype (rapid development)
$ Configure (advanced)
There are no build and config folders and it is not clear how to deploy the project later.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Bratukhin, 2019-08-29
@dantothefuture

In version 3, some of the options are available with the command vue create my-project, some are available with the vue add vuetifyadvanced option.
The webpack config can now be extended/modified via vue.config.js.
As for a-la-carte - Vuetify has its own loader, which automatically imports the necessary components when they are used in templates. Also very convenient.
Deploy from dist folder after build (npm run build).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question