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

Avoid importing components from /src directories of any modules #2084

Open
gabriele-ct opened this issue Sep 13, 2024 · 0 comments
Open

Avoid importing components from /src directories of any modules #2084

gabriele-ct opened this issue Sep 13, 2024 · 0 comments

Comments

@gabriele-ct
Copy link
Contributor

We found out that imports like
import module from '@commercetools-docs/somepackage/src/somefile';

can lead to issues due to the fact that src directory is not always available in prod build.

I'd reccomend:

  • Extend the eslint rule added by @ColinRosati and make it valid for all the packages
  • Ensure that each package exports the public components directly in the root index file
  • Remove any import (both in docs-kit and in docs) that taps into the src directory

Optional (but I think it's important):

  • Change each package's package.json file ensuring that the src folder is not included in the npm package
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