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

根目录下的app.config通过alias引用文件,会提示找不到模块 #7786

Closed
babycannotsay opened this issue Oct 1, 2020 · 2 comments
Labels
enhancement New feature or request V-3 Version - 3.x

Comments

@babycannotsay
Copy link

相关平台

H5

浏览器版本: chrome85
使用框架: React

复现步骤

https://taro-docs.jd.com/taro/docs/config-detail/#alias
按照以上流程配置alias,在ui组件中通过alias引用文件没有问题,但是在src/app.config中引用并使用,就会提示Cannot find module '@/xx'

期望结果

app.config下引用也正常

实际结果

Cannot find module '@/xx',服务直接起不来了

环境信息

 Taro CLI 3.0.11 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.18.4 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.5 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Oct 1, 2020
@luckyadam
Copy link
Member

确实没有支持在 *.config 里使用 alias

@luckyadam luckyadam added the enhancement New feature or request label Oct 9, 2020
@Chen-jj Chen-jj removed T-h5 Target - 编译到 H5 F-react Framework - React labels Oct 28, 2021
@ZakaryCode
Copy link
Contributor

supported in #14825

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

4 participants