Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Bug]: [@vue/compiler-sfc] defineProps is a compiler macro and no longer needs to be imported. #120

Open
xjspace opened this issue Dec 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@xjspace
Copy link

xjspace commented Dec 4, 2023

Version

@opentiny/[email protected]

Vue Version

2.69

Link to minimal reproduction

使用$ tiny init 命令,初始化完成后,tiny start 就出现了

Step to reproduce

新项目使用

  1. 初始化项目
    使用$ tiny init 命令,选择你需要开发的项目类型。

$ tiny init
? 请选择一个适合您项目的套件进行初始化: (Use arrow keys)
dev ---------- 开发tiny-cli套件和插件
> pro ---------- 开箱即用的中后台前端/设计解决方案
docs ---------- 用于开发组件库官网的套件
以第一个 dev套件:开发tiny-cli套件和插件 为例 进行初始化。该套件会让你选择具体的组件类型:

? 请选择你想要初始化的模板 (Use arrow keys)

tiny套件 ---- 用于生成项目模板
tiny插件 ---- 用于拓展tiny功能

? 输入套件/插件名称(tiny-toolkit-/tiny-plugin- 开头) (tiny-toolkit-mytest)
选完类型和组件名称后,tiny会自动将项目模板初始化到你当前的文件夹内,并安装项目所需的依赖包。

耐心等待一分钟,会出现如下提示,说明你组件开发环境已经初始化成功了,可用你熟悉的IDE进行组件开发。

--------------------初始化成功,请按下面提示进行操作--------------------

$ tiny start # 可一键开启项目开发环境
$ tiny help # 可查看当前套件的详细帮助

--------------------技术支持: xxx--------------------
2. 启动开发
执行start命令可以启动本地项目开发:

$ tiny start
.......
[@vue/compiler-sfc] defineProps is a compiler macro and no longer needs to be imported.
微信图片_20231204132744

What is expected

vite v4.5 dev server running at:

Local: http://localhost:3031/
Network: use --host to expose

ready in 1089ms.

What is actually happening

获得了这个错误 [@vue/compiler-sfc] defineProps is a compiler macro and no longer needs to be imported.

Any additional comments (optional)

tiny start 后

@kagol kagol added the bug Something isn't working label Dec 4, 2023
@fengyon
Copy link
Contributor

fengyon commented Dec 7, 2023

感谢您的反馈,这个告警产生的原因是模板使用了老旧的语法,导入了 defineProps

我们会尽快优化,您可以先排查本地的 defineProps 并去掉

- import { defineProps } from 'vue';

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Thank you for your feedback. The reason for this warning is that the template uses old syntax and imports defineProps.

We will optimize as soon as possible. You can check the local defineProps first and remove it.

- import { defineProps } from 'vue';

@fengyon fengyon transferred this issue from opentiny/tiny-vue Dec 7, 2023
fengyon added a commit to fengyon/tiny-cli that referenced this issue Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants