Webpack
Some Installation Problems with Node.js
· β˜• 1 min read
1. Installing node-sass When installing node-sass, the node scripts/install stage downloads a .node file from github.com, and network problems often cause this to fail. You can add an .npmrc file inside the project to configure a proxy for the installation: 1 2 sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ registry=https://registry.npm.taobao.org Or install with cnpm: 1 2 npm install -g cnpm --registry=https://registry.

Vue + Webpack Development
· β˜• 4 min read
1, Initializing the Project vue-cli is the official project scaffold released by Vue; using vue-cli, you can quickly create a Vue + Webpack project. 1 2 3 4 5 6 7 8 9 10 npm install -g vue-cli # Install vue-cli globally vue init webpack myproject # Create a vue project; when it runs, it prompts for information about the project cd myproject # Enter the project npm install # Install the dependency packages; a new node_modules folder is created and the packages are installed there npm run dev # Run locally, by default at http://localhost:8080, starting the service 2, Directory Structure 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |--build //folder for webpack-related code | |--build.