vite4专题

Vue2项目搭建:Vue2.7+Vite4+Pinia+TailwindCSS+Prettier+ESLint

目前 create-vue 和 Vite 都不提供 Vue2 项目的搭建,不想用 Vue CLI 和 webpack,于是就打算从 0 搭建一个工程化项目,支持组合式 API (Composition API) 写法,没有使用 TypeScript,有朋友需要的话我可以再完善一下。 Node.js 16.xpnpm 8.x 初始化 mkdir vue2-vitecd vue2-vit

TailwindCss Vue3 Vite4 安装配置

TailwindCss Vue3 Vite4 安装配置 官方文档 环境 Vue3 Vite4 步骤 1. 创建项目 如果已经有项目,不需要这个步骤 npm create vite@latest my-project -- --template vuecd my-project 2. 安装TailwindCss 安装 tailwindcss 和同级的依赖,创建tailwind.

搭建一个vue3+vant4+vite4+pinia 的移动端h5模板

效果图 项目的创建和组件库的安装 项目创建 pnpm create vite vue3-vant4-vite-pinia-pro-h5 注意: node版本控制在 18+, 可以通过nvm来管理本地的node版本,具体可以看这篇文章 nvm的简单使用 vant-ui库的安装【这里安装的是 ^4.6.0 版本的】 pnpm add vant 注意:

vite4编译报错

报错内容:Only NODE_ENV=development is supported to create a development build of your project. If you need to set process.env.NODE_ENV, you can set it in the Vite config instead. 这个错误提示表明,你正在尝试在非开发环境下创建你

使用uniApp+vue3+Vite4+pinia+sass技术栈构建微信小程序

使用uniApp的cli模式安装,可以使用vscode开发。不用再单独去下载HBuilderX. 1.基础安装 vue3+ts+uniapp 方法一: npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project 方法二:可以去uni-preset-vue的vite分支下选择vite-ts直接下载zip包,解压后粘贴到自己的项目中

vite4项目中,vant兼容750适配

一般非vite项目,使用postcss-px-to-viewport。在设计稿为750时候,可使用以下配置兼容vant。 在vite4项目中,以上配置不行。需要调整下,使用postcss-px-to-viewport-8-plugin,并修改viewportWidth,具体如下: module.exports = (file) => {// console.log(" exports-----

nginx单域名配置访问多vue项目(vue3 + vite4)

。。。简单粗暴。。。 vue配置 项目a vite.config.ts // https://vitejs.dev/config/export default ({ command, mode }: ConfigEnv): UserConfig => {return {// 重要: 配置别名base: '/a/',// 其他配置}} router/index.ts // 创建路由

rouyi-vue-pro+vue3+vite4+Element Plus项目中使用生成Vue2+Element UI标准模板

运行一个pro-vue3的前端项目,以及后端服务 在基础设施-代码生成模块中选择某张数据库表导入,并编辑生成信息,前端类型:Vue2+Element UI标准模板 在vue3项目中创建一个vue文件 <template></template><script>// import {create} from '@/api/test'export default{created(){creat

vue3+vite4中使用svg,使用iconfont-svg图标

记录一下vue3中如何使用svg图标,vue2中大家常用iconfont字体图标,现在vue3大家都又推荐svg的方式使用图表,包括elementplus组件库也变成使用svg方式引用图标。 1、创建svg组件 components/IconSvg.vue <template><svg class="symbol-icon-svg" aria-hidden="true"><use :xlink