Pardeep Jain
Pardeep Jain

Reputation: 86740

Huge number of files generated for every vuejs project

I wanted to start learning with vuejs Cli , but when i installed demo project using cli this creates 13000+ files on my computer.

Package.json file contains number of dependencies like

"devDependencies": {
    "autoprefixer": "^7.1.2",
    "babel-core": "^6.22.1",
    "babel-loader": "^7.1.1",
    "babel-plugin-transform-runtime": "^6.22.0",
    "babel-preset-env": "^1.3.2", 
    "babel-preset-stage-2": "^6.22.0",
    "babel-register": "^6.22.0",
    "chalk": "^2.0.1",
    "connect-history-api-fallback": "^1.3.0",
    "copy-webpack-plugin": "^4.0.1",
    "css-loader": "^0.28.0",
    "eventsource-polyfill": "^0.9.6",
    "express": "^4.14.1",
    "extract-text-webpack-plugin": "^3.0.0",
    "file-loader": "^1.1.4",
    "friendly-errors-webpack-plugin": "^1.6.1",
    "html-webpack-plugin": "^2.30.1",
    "http-proxy-middleware": "^0.17.3",
    "webpack-bundle-analyzer": "^2.9.0",
    "semver": "^5.3.0",
    "shelljs": "^0.7.6",
    "opn": "^5.1.0",
    "optimize-css-assets-webpack-plugin": "^3.2.0",
    "ora": "^1.2.0",
    "rimraf": "^2.6.0",
    "url-loader": "^0.5.8",
    "vue-loader": "^13.3.0",
    "vue-style-loader": "^3.0.1",
    "vue-template-compiler": "^2.5.2",
    "portfinder": "^1.0.13",
    "webpack": "^3.6.0",
    "webpack-dev-middleware": "^1.12.0",
    "webpack-hot-middleware": "^2.18.2",
    "webpack-merge": "^4.1.0"
  },

Why there are so many dependencies list for starter project using vuejs cli ?

Do i need to use something else apart from vuejs Cli ?

Upvotes: 1

Views: 583

Answers (1)

akatakritos
akatakritos

Reputation: 9858

You appear to be using the webpack starter kit.

Here “starter kit” means “a kit to start an ambitious project” not a “kit for a beginner (starter in learning vue).”

All these dependencies are for adding nice development features like live reloading, hot module replacement, single file components, ES6, etc. It’s helping you set up a complicated build process so you don’t get bogged down with those decisions and you can jump right into building your app.

For someone who is new to vue but comfortable in React or other modern front end tools, this setup is common and familiar.

If you’re new to this too, and want to focus on just vue, you can load vue.js right from a CDN and start playing with it.

The guide on the documentation site will walk you through that. In fact they recommend staying away from vue-cli if you’re just learning. They provide steps on how to get setup without it:

https://v2.vuejs.org/v2/guide/

Upvotes: 1

Related Questions