当前位置: 首页 > news >正文

微信网站建设和维护报价表代做seo排名

微信网站建设和维护报价表,代做seo排名,网站轮播广告动画怎么做的,dlink nas做网站最近在捣鼓一下vite#xff0c;因为自己一直在使用react#xff0c;就选择vite、react来体验一下vite。 使用最简单的方法创建一个应用#xff1a;yarn create vite#xff0c;然后选择react框架。 vite默认配置是使用了defineConfig工具函数#xff1a; import { defi…最近在捣鼓一下vite因为自己一直在使用react就选择vite、react来体验一下vite。 使用最简单的方法创建一个应用yarn create vite然后选择react框架。 vite默认配置是使用了defineConfig工具函数 import { defineConfig } from vite export default defineConfig({// ... })不管是js还是ts都可以直接使用defineConfig工具函数如果需要基于dev、serve或者build命令来选择不同选项那就选择导出一个函数比如 export default defineConfig(({ command, mode, ssrBuild }) {if (command serve) {return {// dev 独有配置}} else {// command buildreturn {// build 独有配置}} })共享选项 root 这是项目根目录【index.html的位置】可以根据自己项目的规范来配置。比如 const root: string process.cwd(); export default defineConfig(({ command, mode, ssrBuild }) {return {root,plugins: [react()]}; });base 开发或者生产环境服务的公共基础路径 mode mode就是指明模式比如development或者production如果在vite.config.ts中配置的话那么就会把serve和build模式下覆盖掉 plugin 应用需用用到的插件是一个数组因为应用中可能使用到很多插件。vitereact中插件就是react比如 import react from vitejs/plugin-react; const root: string process.cwd(); export default defineConfig(({ command, mode, ssrBuild }) {const { VITE_PUBLIC_PATH, VITE_PORT } loadEnv(mode, process.cwd(), );return {base: VITE_PUBLIC_PATH,root,plugins: [react()]}; });resolve.alias 设置别名比如完整配置 import { defineConfig, loadEnv } from vite; import react from vitejs/plugin-react; import { resolve } from path;const root: string process.cwd();// 查找路径 const pathResolve (dir: string): string {return resolve(__dirname, ., dir); }; // 别名 const alias: Recordstring, string {: pathResolve(src),build: pathResolve(build), }; // https://vitejs.dev/config/ export default defineConfig(({ command, mode, ssrBuild }) {const { VITE_PUBLIC_PATH, VITE_PORT } loadEnv(mode, process.cwd(), );return {base: VITE_PUBLIC_PATH,root,plugins: [react()],resolve: {alias,},}; }); server 开发服务器配置选项。 host指定开发服务器监听的某个IP地址如果是设置为0.0.0.0或者true那就是默认监听所有的地址。port开发服务器端口号strictPort设置为true的时候遇到端口号被占用了就会直接退出https是否开启HTTPSopen自动在浏览器中开启应用程序proxy请求路径的代理比如 export default defineConfig({server: {proxy: {// 字符串简写写法http://localhost:5173/foo - http://localhost:4567/foo/foo: http://localhost:4567,// 带选项写法http://localhost:5173/api/bar - http://jsonplaceholder.typicode.com/bar/api: {target: http://jsonplaceholder.typicode.com,changeOrigin: true,rewrite: (path) path.replace(/^\/api/, ),},// 正则表达式写法http://localhost:5173/fallback/ - http://jsonplaceholder.typicode.com/^/fallback/.*: {target: http://jsonplaceholder.typicode.com,changeOrigin: true,rewrite: (path) path.replace(/^\/fallback/, ),},// 使用 proxy 实例/api: {target: http://jsonplaceholder.typicode.com,changeOrigin: true,configure: (proxy, options) {// proxy 是 http-proxy 的实例}},// 代理 websockets 或 socket.io 写法ws://localhost:5173/socket.io - ws://localhost:5174/socket.io/socket.io: {target: ws://localhost:5174,ws: true,},},}, })
http://www.hkea.cn/news/14298847/

相关文章:

  • 特色专业建设网站如何做供求网站
  • 青岛网站建设一青岛博采网络wordpress菜单侧边栏
  • 松江专业做网站公司ui高级培训机构
  • seo建站教程网站地图添加
  • 深圳市设计网站宿州市网站建设
  • 西丽做网站做蛋糕网站的优点
  • 网络营销导向型企业网站建设的原则电商网站的意义
  • 网站负责人不是法人天津网站建设wangzhii
  • 租服务器发布网站微信小程序怎么做问卷调查
  • 网站开发技术文档网站转app工具
  • 怎样建自己的网站商务网站设计报告
  • 免费网站优缺点网站服务器基本要素有哪些
  • 河北建设集团有限公司 信息化网站广州番禺邮政编码
  • 怎么做网站广告古董wp建站模板
  • 网站简单设计广告发布合同
  • 实体企业做网站好么区域门户网站源码
  • 58同城推广能免费做网站吗wordpress开启菜单
  • 网站名字怎样做版权wordpress wpenqueuestyle
  • 做网站推广的公司网站开发工作好不好
  • 网站改版的方式大致有珠海市网站建设怎么样
  • 小企业怎么推广seo专业培训中心
  • 网站开发要哪些网站雪花特效
  • 云南网站建设电话东莞路桥投资发展有限公司
  • 站酷网官网进入百度推广开户需要多少钱
  • 微信公众号开发步骤上海网络关键词优化
  • 怎么做游戏测评视频网站网站建设幻灯片背景图片素材
  • 网站首页结构图门店管理系统app
  • 女人被做网站网站备案背景幕布尺寸
  • 长沙网站建设哪家公司好快速建设企业门户网站
  • 网站功能框架企业vi设计作品