uni-app 纯 nvue 模式下 uni_modules 中的 web-view 无法加载本地文件

uni-app 纯 nvue 模式下 uni_modules 中的 web-view 无法加载本地文件

类别 信息
产品分类 uniapp/App
PC开发环境 Windows
PC版本号 Windows 10 20H2
手机系统 Android
手机版本号 Android 10
手机厂商 华为
手机机型 Mate 30E Pro
页面类型 nvue
打包方式 云端
项目创建方式 HBuilderX

操作步骤:

  • 运行附件中的 demo 项目

预期结果:

  • 正常显示本地网页

实际结果:

  • 报错:‼ 「copy-webpack-plugin」: unable to locate
  • 且无法显示网页

bug描述:

纯 nvue 模式下,uni_modules 目录下组件中的 web-view,无法打开对应 static 中的本地网页
关闭纯 nvue 模式或将 uni_modules 目录下的内容移到项目根目录下的 components 和 static 中都可以正常打开


更多关于uni-app 纯 nvue 模式下 uni_modules 中的 web-view 无法加载本地文件的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

你的意思是要在uni_modules目录下加载uni_modules组件内目录的网页?

更多关于uni-app 纯 nvue 模式下 uni_modules 中的 web-view 无法加载本地文件的实战教程也可以访问 https://www.itying.com/category-93-b0.html


是的,就像这样 <web-view src="/uni_modules/test/static/test/local.html" />

回到顶部