This article documents some learning webpack + vue related knowledge, to facilitate future access, add or modify
1. initialization code structure vue project
build-- project dependencies configuration information
config-- project configuration file
dev.env.js-- development environment configuration file
index.js-- basic configuration file
prod.env.js-- online environment configuration file
mode_module-- file dependencies
src-- source project
assets-- project images resources
components-- project team members
router-- project route
App.vue-- project root component files
main.js-- project entry file
static-- static resources (can directly access external data files)
.babelrc - babel parser syntax conversion profile
.editorconfig-- editor syntax of the configuration file
.eslintignore-- specify which files do not eslint syntax check
.eslintrc.js - eslint syntax check configuration file
.gitignore-- specify which files do not git submitted
.postcssrc.js - postcss profile
Home index.html-- project file
package-lock.json-- dependencies file version information
package-- information file dependencies
README.md-- documentation
2. Install cli / create cli project / installation dependencies
npm install --global vue-cli vue init webpack projectname npm install packagename --save
3. Directory abbreviations
The number of commonly used abbreviations directory:
Open build folder webpack.base.conf.js file, using '~ styles' in place of the project 'src / assets / styles'
resolve: { 'styles': resolve('src/assets/styles') }