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
使用cnpm安装包,会在node_modules目录下生成带下划线前缀的目录,比如 : node_modules\_vant@3.2.2@vant\lib\
node_modules\_vant@3.2.2@vant\lib\
在计算包路径时候 lastIndex 会导致多计算一个下划线字符
function resolveNodeModules(libName, ...dir) { const modulePath = require.resolve(libName); const lastIndex = modulePath.indexOf(libName); // console.log('resolveNodeModules', modulePath, lastIndex) return _vite.normalizePath.call(void 0, _path2.default.resolve(modulePath.substring(0, lastIndex), ...dir)); }
计算获取的路径为: /node_modules/_/vant/es/icon/style
/node_modules/_/vant/es/icon/style
最终导致加载的style文件失败
The text was updated successfully, but these errors were encountered:
你好,请问这个最后怎么解决的,改源码吗
Sorry, something went wrong.
是的
Try to upgrade to 1.3.0
No branches or pull requests
使用cnpm安装包,会在node_modules目录下生成带下划线前缀的目录,比如 :
node_modules\_vant@3.2.2@vant\lib\
在计算包路径时候 lastIndex 会导致多计算一个下划线字符
计算获取的路径为:
/node_modules/_/vant/es/icon/style
最终导致加载的style文件失败
The text was updated successfully, but these errors were encountered: