提交 befea124 编写于 作者: fxy060608's avatar fxy060608

fix: resolve with extensions (question/139311)

上级 a56a3687
......@@ -12,7 +12,7 @@ export function customResolver(updatedId: string) {
if (isWindows) {
return normalizePath(requireResolve(updatedId, process.env.UNI_INPUT_DIR))
}
return updatedId
return requireResolve(updatedId, process.env.UNI_INPUT_DIR)
}
export function createResolve(
......
......@@ -22,6 +22,7 @@ export function createConfigResolved(options: VitePluginUniResolvedOptions) {
initCheckUpdate()
if (isWindows) {
// TODO 等 https://github.com/vitejs/vite/issues/3331 修复后,可以移除下列代码
// 2.8.0 已修复,但为了兼容旧版本,先不移除
const item = config.resolve.alias.find((item) =>
typeof item.find !== 'string' ? item.find.test('@/') : false
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册