vue脚手架和webpack创建项目

1 创建一个文件夹
2 下载脚手架 npm install --global vue-cli
3 使用webpack初始化项目 vue init webpack my-project
4 对项目进行一些配置
Project name 项目名称(enter)
  Porject description 项目描述(enter)
  Author (enter)
vue build 使用什么创建(enter)
 Install vue-router 是否安装vue路由(y)
 use eslint … 是否使用eslint检查你的代码(n) 如果选择y 然后回车
 set up unit tests… 测试(n)
 set up e2e… 测试(n)
 yes use NPM… (enter)
vue脚手架和webpack创建项目
5 到此项目就初始化好了

6 在自动生成的项目中,config下的index.js文件中,需要做的修改是可以在导出的模块中的dev 里proxyTable设置路径的别称
需要把host改成自己电脑的ip地址
port是启动服务时的端口号,其他的不需要修改

相关文章:

  • 2021-08-16
  • 2021-08-17
  • 2021-09-05
  • 2021-05-21
猜你喜欢
  • 2021-03-30
  • 2021-08-02
  • 2021-08-19
  • 2021-12-17
  • 2021-08-07
  • 2021-07-04
  • 2022-01-15
相关资源
相似解决方案