- webpack配置项
module.exports={
entry:,//唯一入口文件
output:{
path:,//打包后存放地址
filename:,//打包后文件名
},
devtool:,//编译文件与源文件对应的关系
module:{/loaders
rules:[
{
test:,//loader处理文件扩展名的正则表达式
loader:,//loader名称
include/exclude:,//必须处理或屏蔽文件(文件夹)
query:,额外设置选项
}
]
}, plugins:[ oneplug, twoplug ]} - npm调用webpack修改package.json
npm start即可"scripts": { "start": "webpack" },
start语法糖 否则需npm run {script name}
如npm run build这样调用
- vue-router参数routerconfig={ path: string; component?: Component; name?: string; // for named routes (命名路由) components?: { [name: string]: Component }; // for named views (命名视图组件) redirect?: string | Location | Function; alias?: string | Array<string>; children?: Array<RouteConfig>; // for nested routes beforeEnter?: (to: Route, from: Route, next: Function) => void; meta?: any;}
- vuexstategetter //类似computedmutations //改变state状态(同步)action //通过mutations改变state(异步)module //模块化