storybookjs/storybook

[Bug]: experimental_indexers ignores importPath

Ouverte

#25 554 ouverte le 10 janv. 2024

 (15 commentaires) (0 réaction) (1 personne assignée)TypeScript (10 058 forks)batch import
buggood first issuehelp wantedsev:S3story index

Métriques du dépôt

Stars
 (89 909 étoiles)
Métriques de merge PR
 (Merge moyen 7j 22h) (184 PRs mergées en 30 j)

Description

Describe the bug

In the experimental indexer docs it says that an indexer can specify an importPath to a target CSF file, but doing so has no effect. Looking at the source code it looks like the importPath returned from an indexer is not used and instead the input source to the indexer will always be used as the importPath.

To Reproduce

https://github.com/storybookjs/storybook/blob/e942e71e1f5281f9197faab6d61625b0ac8cecfd/code/lib/core-server/src/utils/StoryIndexGenerator.ts#L302

System

Storybook Environment Info:

  System:
    OS: macOS 14.2.1
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.1.16 - /opt/homebrew/bin/bash
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    Yarn: 4.0.2 - ~/.nvm/versions/node/v20.10.0/bin/yarn <----- active
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
  Browsers:
    Chrome: 120.0.6099.109
    Edge: 120.0.2210.121
    Safari: 17.2.1

Additional context

No response

Guide contributeur