stencil icon indicating copy to clipboard operation
stencil copied to clipboard

bug: CSS Section Not Generated in Component Documentation When Using NX

Open oliveirarafa opened this issue 1 year ago • 0 comments

Prerequisites

Stencil Version

4.23.0

Current Behavior

We are using @stencil/core version ^4.23.0 in our project, and we are experiencing an issue where the CSS section is not being generated in the automatic documentation of our components.

When we create a separate Stencil project, the CSS section is correctly generated. However, when we move the project inside an NX workspace, the CSS section is missing from the generated documentation.

Expected Behavior

The CSS section should be included in the generated documentation, even when the project is inside an NX workspace.

System Info

- **Stencil Version:** `^4.23.0`
- **NX Version:** `v20.3.0`
- **Node Version:** `v20.18.1`

Steps to Reproduce

  1. Create a standalone Stencil project.

  2. Add a CSS property documentation comment as shown below:

    :host {
      display: block;
    
      /**
       * @prop --border-radius: Border radius of the avatar and inner image
       */
      border-radius: var(--border-radius);
    }
    
  3. Configure stencil.config.ts with:

    { type: 'docs-readme' }
    
  4. Generate the documentation and verify that the CSS section is present.

  5. Move the project inside an NX workspace.

  6. Generate the documentation again and check if the CSS section appears.

Code Reproduction URL

https://gitlab.com/govbr-ds/bibliotecas/wbc/govbr-ds-wbc/

Additional Information

Any insights on how to resolve this issue or workarounds would be greatly appreciated. Has anyone experienced similar behavior when using Stencil inside NX?

oliveirarafa avatar Jan 31 '25 14:01 oliveirarafa