Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

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

@gabriele-ct

Description

@gabriele-ct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions