histoire-dev / histoire-dev/histoire
Auto props detection not work with Vue2
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
When using **Histoire**, **Vue2** does not automatically detect props. I don't know if it's deliberate but I couldn't find anything in the documentation. If it is voluntary, how could it be changed to make it work?
### Reproduction
Start the histoire-example-vue3 but change the package config with Vue2
### System Info
```shell
System:
OS: Linux 6.8 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (8) x64 Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz
Memory: 12.25 GB / 30.96 GB
Container: Yes
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.17.1 - /usr/bin/node
npm: 9.6.7 - /usr/bin/npm
Browsers:
Chrome: 128.0.6613.84
npmPackages:
@histoire/plugin-vue2: ^0.17.17 => 0.17.17
@vitejs/plugin-vue2: 2.3.1 => 2.3.1
histoire: ^0.17.17 => 0.17.17
vite: 5.3.4 => 5.3.4
```
### Used Package Manager
npm
### Validations
- [X] Follow our [Code of Conduct](https://github.com/histoire-dev/histoire/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/histoire-dev/histoire/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://histoire.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/histoire-dev/histoire/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/histoire-dev/histoire/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Contributor guide
Research direction
Start by running the histoire-example-vue3 reproduction after changing its package configuration to Vue2, using the reported @histoire/plugin-vue2 and Vite setup. Trace the Vue2 prop-detection entry point and compare its behavior with Vue3; done means Vue2 components automatically expose their props in Histoire, with coverage for the reproduced case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100