Skip to content
New issue

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

本地图片无法打包到dist目录 导致报错 #7113

Closed
hujialianghuwei opened this issue Jul 20, 2020 · 1 comment
Closed

本地图片无法打包到dist目录 导致报错 #7113

hujialianghuwei opened this issue Jul 20, 2020 · 1 comment

Comments

@hujialianghuwei
Copy link

相关平台

微信小程序

复现仓库

https://nervjs.github.io
小程序基础库: 2.11.2
使用框架: React

复现步骤

在一个组件中引用本地文件,无论是通过require ,还是import 引入资源文件,在编译打包后,始终无法在dist 目录中找到,控制台提示资源不存在

期望结果

可以正常打包到dist ,正常引用

实际结果

不能正常使用图片

环境信息


  Taro CLI 2.2.3 environment info:
    System:
      OS: macOS 10.15.5
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 10.16.0 - /usr/local/bin/node
      Yarn: 1.19.1 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 2.2.3 => 2.2.3 
      @tarojs/components-qa: 2.2.3 => 2.2.3 
      @tarojs/mini-runner: 2.2.3 => 2.2.3 
      @tarojs/redux: 2.2.3 => 2.2.3 
      @tarojs/redux-h5: 2.2.3 => 2.2.3 
      @tarojs/router: 2.2.3 => 2.2.3 
      @tarojs/taro: 2.2.3 => 2.2.3 
      @tarojs/taro-alipay: 2.2.3 => 2.2.3 
      @tarojs/taro-h5: 2.2.3 => 2.2.3 
      @tarojs/taro-qq: 2.2.3 => 2.2.3 
      @tarojs/taro-quickapp: 2.2.3 => 2.2.3 
      @tarojs/taro-swan: 2.2.3 => 2.2.3 
      @tarojs/taro-tt: 2.2.3 => 2.2.3 
      @tarojs/taro-weapp: 2.2.3 => 2.2.3 
      @tarojs/webpack-runner: 2.2.3 => 2.2.3 
      eslint-config-taro: 2.2.3 => 2.2.3 
      eslint-plugin-taro: 2.2.3 => 2.2.3 
      nerv-devtools: ^1.5.5 => 1.5.6 
      nervjs: ^1.5.5 => 1.5.6 
      stylelint-config-taro-rn: 2.2.3 => 2.2.3 
      stylelint-taro-rn: 2.2.3 => 2.2.3 
      taro-ui: ^2.3.4 => 2.3.4 
    npmGlobalPackages:
      typescript: 3.9.6
@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 20, 2020

image

这样提出问题,让别人如何帮助你呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants