ErKeLost / create-vite-app

🍰🍰 VIte-CLI resolve Vite create starter template No need to configure vite scaffolding templates quickly build vite4.x development templates highly customized Vue3.x React 18 Vite5.x
https://vite-cli.netlify.app/
226 stars 32 forks source link

📦📦 Create Vite App 交流群 #2

Closed ErKeLost closed 2 years ago

ErKeLost commented 2 years ago

857a7b082dc5611e491a2ec80256e4e

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 7 days with no activity.

BeanWei commented 2 years ago

@ErKeLost 二维码失效了。这个cli有node版本要求么,在16.x的环境下貌似无法work

ErKeLost commented 2 years ago

@ErKeLost 二维码失效了。这个cli有node版本要求么,在16.x的环境下貌似无法work

@BeanWei 二维码已更新 16版本下貌似没有解析path 绝对路径,导致报错,正在排查看看有没有其他方法, 目前项目在重构,可以暂时使用node14.x, 试了好多esbuild path 但是不生效

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 3 days since being marked as stale.

1279285772 commented 1 year ago

我的node是18.16.0,mac 上执行 npx create-vite-template@latest 后,显示 sh: vite-app: command not found ,怎么处理(本人菜鸟,望大佬指点迷津)

ErKeLost commented 1 year ago

我的node是18.16.0,mac 上执行 npx create-vite-template@latest 后,显示 sh: vite-app: command not found ,怎么处理(本人菜鸟,望大佬指点迷津)

这个问题是因为新版本没有指定到文件地址导致的 最新版本已经修复了 可以使用了

Zhengjincheng33 commented 2 months ago

想问下,src里面的plugins 文件,这些方法 在main.ts里面注册了要怎么使用,这种注册方式在网上没找到(本人菜鸟,望大佬指点迷津)

ErKeLost commented 2 months ago

@Zhengjincheng33 src 里的 plugin 主要是注册一些常见的功能 比如全局注册一些 全局组件 就直接 use 之后直接使用组件积极可以了 可以看看 vue 文档里的 use 注册

Zhengjincheng33 commented 2 months ago

image 用起了,但是会有这个提示,要怎么关闭呢,谢谢大佬

ErKeLost commented 2 months ago

这个是 类型报错 你可以app?.appContext?. 具体要看一下上下文 可以试一下 可选链 或者 (app.appContext.config.globalProperties.$getlog as Function)(44444444) 试一下

Zhengjincheng33 commented 2 months ago

谢谢, const { appContext } = getCurrentInstance() as any 我这样解决了