第二十八章-Vite配置-base

Vite配置-base说明

官网原文:

  • 类型: string

  • 默认: /

    开发或生产环境服务的 公共基础路径。合法的值包括以下几种:

    • 绝对 URL 路径名,例如 /foo/
    • 完整的 URL,例如 https://foo.com/
    • 空字符串或 ./(用于开发环境)

    更多信息详见 公共基础路径

就是你的项目的BaseURL。比如这里我配置一个yiu

那么我的项目访问:http://localhost:3000/yiu/

当你访问其他路径就会报错:http://localhost:3000/any/

The server is configured with a public base URL of /yiu/ - did you mean to visit /yiu/any/ instead?

上一章

第二十七章-Vben中的wrapperEnv方法

下一章

第二十九章-Vite配置-root

# vben  vite 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×