# vue3-ts-dome **Repository Path**: sbotlp/vue3-ts-dome1 ## Basic Information - **Project Name**: vue3-ts-dome - **Description**: vue3 + ts + 函数式写法 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-10-31 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ts-vue3 ``` vue create ts-vue3 ``` ### 配置1 ``` ? Please pick a preset: Default ([Vue 2] babel, eslint) Default (Vue 3 Preview) ([Vue 3] babel, eslint) ❯ Manually select features ``` ### 配置2 ``` ? Check the features needed for your project: ◉ Choose Vue version ◉ Babel ◉ TypeScript ◯ Progressive Web App (PWA) Support ◉ Router ◉ Vuex ◉ CSS Pre-processors ◯ Linter / Formatter ◯ Unit Testing ◯ E2E Testing ``` ### 配置3 ``` ? Choose a version of Vue.js that you want to start the project with 2.x ❯ 3.x (Preview) ``` ### 配置4 ``` ? Use class-style component syntax? (y/N) n ``` ### 配置5 ``` ? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfi lls, transpiling JSX)? (Y/n) n ``` ### 配置6 ``` ? Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n) y ``` ### 配置7 ``` ? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): (Use arrow keys) ❯ Sass/SCSS (with dart-sass) Sass/SCSS (with node-sass) Less Stylus ``` ### 配置8 ``` ? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys) ❯ In dedicated config files In package.json ``` ### 配置8 ``` ? Save this as a preset for future projects? (y/N) n ``` ### ts文件中引入js代码块 修改配置 ``` https://blog.csdn.net/candyguy242/article/details/84619884?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~sobaiduend~default-1-84619884.nonecase&utm_term=ts%E5%BC%95%E7%94%A8js%E6%96%87%E4%BB%B6&spm=1000.2123.3001.4430 "allowJs": true ``` ## Project setup ``` yarn install ``` ### Compiles and hot-reloads for development ``` yarn serve ``` ### Compiles and minifies for production ``` yarn build ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/). ### git ``` 给已经在版本管理中的文件添加忽略 git update-index --assume-unchanged mock/data.json ```