We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
首先我是通过Hbuilder X 创建的uni-app 默认模版 vue3 的项目
我现在需要设置路径的别名,我在项目根目录下新建了一个vite.confg.js文件,内容如下:
import {defineConfig} from "vite"; import uni from "@dcloudio/vite-plugin-uni"; import {resolve} from "path"; export default defineConfig({ plugins: [ uni(), ], resolve: { // 路径别名 alias: { "@": resolve(__dirname, "./src"), }, }, });
然后我又在根目录下新增了一个jsconfig.json文件,代码如下:
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] } }, "exclude": ["node_modules", "dist"] }
当我使用@/引入路径时,运行不起来,地址错误。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
首先我是通过Hbuilder X 创建的uni-app 默认模版 vue3 的项目
我现在需要设置路径的别名,我在项目根目录下新建了一个vite.confg.js文件,内容如下:
然后我又在根目录下新增了一个jsconfig.json文件,代码如下:
当我使用@/引入路径时,运行不起来,地址错误。
The text was updated successfully, but these errors were encountered: