VUE-CLI3 与 VUE-CLI2 版本有很大区别:
1.VUE-CLI3是基于webpack4打造,VUE-CLI2还是webpack3
2.VUE-CLI3的设计原则是“0配置”,移除了配置文件根目录下的build和config等目录
3.VUE-CLI3提供了vue ui命令,提供了可视化配置,更加人性化
4.移除了static文件夹,新增了public文件夹,并且index.html移动到public中
1.创建项目(vue create testvuecli3)
Please pick a preset: (Use arrow keys):选择一个配置方式
> default (babel, eslint):默认,
Manually select features:手动选择
选择手动以后:
Check the features needed for your project: (空格键选择和取消)
(*) Babel
( ) TypeScript
>( ) Progressive Web App (PWA) Support
( ) Router
( ) Vuex
( ) CSS Pre-processors
(*) Linter / Formatter
( ) Unit Testing
( ) E2E Testing
Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? (Use arrow keys):对应的配置单独生成文件还是放在package.json中
> In dedicated config files(单独的配置)
In package.json(配置在package.json中)
Save this as a preset for future projects? (y/N)
Save this as a preset for future projects? (y/N):是否把刚才的配置保存为一个配置方式(第一步的选择)