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

大佬,使用test时,如何使用best-require呢? #4

Open
zhangdaren opened this issue Aug 16, 2021 · 1 comment
Open

大佬,使用test时,如何使用best-require呢? #4

zhangdaren opened this issue Aug 16, 2021 · 1 comment

Comments

@zhangdaren
Copy link

现在项目结构是src+test两个目录,但在test里require src目录下面的js时,会报错,因为从当前文件进行test时,找不到src目录下面的文件了。。

@zhangdaren
Copy link
Author

算解决了,统一使用var appRoot = require('app-root-path').path,来作为前缀。。

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

1 participant