Closed Xiphin closed 3 months ago
The update in the PageContext
class involves a modification to how the root
variable is computed. It now integrates an additional path component, enhancing its configuration flexibility by incorporating this.options.root
during the path calculation.
File Path | Change Summary |
---|---|
.../core/src/context.ts |
Modified the calculation of the root variable in PageContext to include this.options.root in its path. |
🐇💻 A whimsical code hop,
Changes drop, non-stop.
Paths extend, roots entwine,
In the burrow of code, all align.
Celebrate the tweak, so fine! 🌟
~ CodeRabbit 🎩🐰
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
这里是不是直接 const root = slash(path.relative(basePath, this.options.root, dir))
就好了?
这里是不是直接
const root = slash(path.relative(basePath, this.options.root, dir))
就好了?
relative(from: string, to: string): string
relative 函数应该只有两个入参
这里是不是直接
const root = slash(path.relative(basePath, this.options.root, dir))
就好了?relative(from: string, to: string): string
relative 函数应该只有两个入参
确实,是我一时眼花看错了,不好意思😵💫
LGTM
Description 描述
子包目录解析会报错:
解决办法:
https://github.com/uni-helper/vite-plugin-uni-pages/blob/4459a1bfaa6d14becd56f0272ee62f5705daea9e/packages/core/src/context.ts#L245 改成:
Linked Issues 关联的 Issues
无
Additional context 额外上下文
在 HBuilderX 下运行
Summary by CodeRabbit