Vite

构建项目

### 创建项目 ```bash npm create vite@latest # OR yarn create vite ``` ### 使用模板创建项目 ```bash # npm 6.x npm create vite@latest my-vue-app --template vue # npm 7+, extra double-dash is needed: npm create vite@latest my-vue-app -- --template vue # yarn yarn create vite my-vue-app --template vue # pnpm pnpm create vite my-vue-app --template vue ```

Vue CLI

构建项目

### 安装 ```bash npm install -g @vue/cli # OR yarn global add @vue/cli ``` ### 创建项目 ```bash vue create hello-world ``` ### 安装 TailWind CSS ```bash # 安装依赖 yarn add -D tailwindcss@latest postcss@latest autoprefixer@latest # 生成配置文件 npx tailwindcss init -p # 修改配置文件 tailwind.config.js module.exports = { content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], theme: { extend: {}, }, plugins: [], } # 创建 index.css @tailwind base; @tailwind components; @tailwind utilities; # main.js 引入 index.css ``` ### 安装公司内部的 npm 包 ```bash pnpm add @yhsoft/web-fabric --registry=https://npm.yinghuasoft.com ```