webpack5 编译报 [ERROR] [plugin scanImports] Can't resolve 错,在采用文件后缀拆分的方式时 #14123
Labels
A-PreBundle
Area - 依赖预编译
E-medium
Helper Wanted - Medium
F-react
Framework - React
T-h5
Target - 编译到 H5
V-3
Version - 3.x
Milestone
相关平台
H5
复现仓库
https://github.com/TimCN/plugin-scan-import-error.git
浏览器版本: 最新Chrome
使用框架: React
复现步骤
src/pages/index/utils/index.h5.ts
,src/pages/index/utils/index.weapp.ts
文件,并导出一些方法,例如:src/pages/index/index.tsx
中导入并使用该方法import { add } from './utils'
期望结果
控制台不报错
实际结果
控制台报[ERROR] [plugin scanImports] Can't resolve 错
环境信息
The text was updated successfully, but these errors were encountered: