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

建议:build/plugins.ts 更名为 plugin/index.ts #1

Open
miozus opened this issue Dec 27, 2023 · 1 comment
Open

建议:build/plugins.ts 更名为 plugin/index.ts #1

miozus opened this issue Dec 27, 2023 · 1 comment

Comments

@miozus
Copy link

miozus commented Dec 27, 2023

理由:

➜  supermario-ui git:(develop) npm run build    

> [email protected] build
> vue-tsc --noEmit && vite build

vite.config.mts:28:35 - error TS2307: Cannot find module './build/plugins' or its corresponding type declarations.

28 import { createVitePlugins } from './build/plugins'
        

我本地打包可以,但上服务器提示找不到模块。

我以为没加 ts 声明 declare 加了也没效果。以为找不到 ./ 路径,改 @/ 也没效果。

结果 ls 查看,当场歇逼了。检查 .gitignore 也没过滤 build 目录呀。但是 vscode 看到 builddist 图标一样。

所以,某种神秘力量导致这个目录被过滤了。建议更名。

@xia5800
Copy link
Owner

xia5800 commented Jan 3, 2024

很抱歉回复晚了,你的建议不错,日常开发中build和dist目录容易混淆,确实想改个名字来着。
至于你说的服务器上提示找不到模块我自己倒是没有遇到过。下次提交将修改build目录的名字

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants