浏览器重点:**不支持IE浏览器Firefox、Chrome51+(无实测,根据代理兼容性猜测)安装检查vue版本是否低于3.0,先卸载再安装然后安装,不安装直接安装(node.js8.0+)vue-V/vue--versionnpminstall-g@vue/cli(3.0以下先卸载npmuninstallvue-cli-g)创建一个项目1.commandcreatevue-cli3.0+createprojectvuecreatemy-project(projectname)vue-cli2.0sceneprojectvueinitwebpackmy-project2,uicreatevueuiselectprojectdependency1,selectprojectpresetvuemy-projectVueCLIv4。5.15?Pleasepickapreset:(Usearrowkeys)>Default([Vue2]babel,eslint)--vue2projectdefaultpresetDefault(Vue3)([Vue3]babel,eslint)--vue3projectdefaultpresetSet手动选择features--手动选择默认预设(default):包括babel,eslint2,以及设置项目所需的功能。建全家桶+需要选择typescript="手动选择功能?请pickapreset:手动选择功能?勾选你的项目需要的功能:(*)ChooseVueversion--选择vueversion(*)Babel--设置babel代码编译(必需)(*)TypeScript--ts()ProgressiveWebApp(PWA)Support--Progressivewebsystembrowserapp(*)Router--vuerouting(*)Vuex--vuestatemanagementlibrary(*)CSSPre-processors--CSS预处理器(*)Linter/Formatter--codeinspection()UnitTesting--unittesting>(*)E2ETesting--end-to-endtesting/automatedtesting3.选择预设功能a,vue版本b,是否使用class组件语法,是一个TypeScript项目所以Vue-class-componentvue-property-decoratorvuex-class解析参考文章需要设置Useclass-style组件语法:https://blog.csdn.net/weixin_44041976/article/details/107732228https://zhuanlan.zhihu.com/p/48371638c,Babel和TypeScript一起使用自动检测填充?一定要选择yUseBabel和TypeScript(现代模式、自动检测的polyfills、转译JSX需要)?是的,路由历史模式?路由器使用历史记录模式?(生产中索引回退需要适当的服务器设置)是HTML5历史模式说明:https://router.vuejs.org/zh/guide/essentials/history-mode.html使用历史模式刷新页面时会出现404错误解决:服务端需要配置前端路由配置:e.选择csspreprocessing选择一个CSS预处理器(默认支持PostCSS、Autoprefixer和CSSModules):>Sass/SCSS(withdart-sass)--recommendedDartinstalledperformanceisbetterSass/SCSS(withnode-sass)--国内安装比较难,省事容易所用的sass版本对node版本也有限制LessStylusf,选择代码检测方式?选择一个短绒/格式化程序config:(Usearrowkeys)ESLintwitherrorpreventiononlyESLint+AirbnbconfigESLint+Standardconfig>ESLint+PrettierTSLint(deprecated)ESLintwitherrorpreventiononly:OnlyconfiguretherecommendedrulesusingESLintofficialwebsiteESLint+Airbnb配置:使用ESLint官网推荐规则+Airbnb第三方配置ESLint+标准配置:使用ESLint官网推荐规则+标准第三方配置ESLint+Prettier:使用ESLint官网推荐规则+Prettier第三方配置TSLint:TypeScript代码检查注意:TSLint是TypeScript代码检测,但是TSLint和ESLint的检测内容类似,TSLint已经停止维护。推荐使用ESLint进行代码检查。ESLint官网推荐规则链接Airbnb链接Standard链接Prettier链接TSLint链接参考如下文章(跟作者一样):https://blog.csdn.net/weixin_42069147/article/details/114262216https://www.jianshu.com/p/1082eab5e593g、选择检测时间?选择其他lint功能:(按
