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

Is it not possible to automatically import from js and components in node_modules? #528

Open
4 tasks done
lgzhang opened this issue Sep 13, 2024 · 0 comments
Open
4 tasks done

Comments

@lgzhang
Copy link

lgzhang commented Sep 13, 2024

Describe the bug

I used the mono-repo approach in my development, which means I placed two repositories side by side so that imports can be automatically resolved. However, when it comes to deployment, I packaged one of them into an npm package and loaded it from node_modules, but the imports no longer work. I've tried adding directories and using exclude to exclude certain files, but it didn't work.

Does anyone have a solution to this issue? Thank you.

tranlate into chinese:
我开发时采用的mono-repo的方式,即将两个仓库并列,这样引入可以自动导入。但如果上线上,我将其中一个打成npm包,从node_modules中加载,就不能导入。试着添加了dirs目录和exclude排除等,没有生效。
请问大家有没有遇到的解决办法,谢谢

Reproduction

report

System Info

Browsers

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [] The provided reproduction is a minimal reproducible of the bug.
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