vue3构建

1.用vite 构建 vue

官网:开始 | Vite 官方中文文档 (vitejs.dev)icon-default.png?t=N7T8https://cn.vitejs.dev/guide/

npm create vite@latest

2.安装Tailwind CSS

官网:安装 - TailwindCSS中文文档 | TailwindCSS中文网icon-default.png?t=N7T8https://www.tailwindcss.cn/docs/installation

 

 

安装 Tailwind CSS

通过 npm 安装 tailwindcss,然后创建你自己的 create your tailwind.config.js 配置文件。

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

修改style.css (Add the @tailwind directives for each of Tailwind’s layers to your ./src/style.css file.)

@tailwind base;
@tailwind components;
@tailwind utilities;

1. 将 tailwind.config.js 改为 tailwind.config.cjs 

2. 文件内容修改为:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    './index.html',
    './src/**/*.{vue,js,ts,js,jsx,tsx}'
  ],
  theme: {
    extend: {},
  },
  plugins: [],
};

3. 将postcss.config.js 修改为 postcss.config.cjs

4. 文件内容修改为:

module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}

 

 Vue3安装配置、开发环境搭建(组件安装卸载)(图文详细)

Vue3安装配置、开发环境搭建(组件安装卸载)(图文详细)-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/weixin_69553582/article/details/129584587

vue create is a Vue CLI3 only command and you are using Vue CLI 2.9.6.You may want to run..._vue create is a vue cli 3 only command and you are-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/weixin_61529967/article/details/132333457

  • 19
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值