histoire
histoire copied to clipboard
The CJS build of Vite's Node API is deprecated
Describe the bug
Hello, I migrate all my project to pure ESM, vite part works fine without any warn about CJS but when I try to launch histoire, I have this warn :
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
How to avoid this warn and force histoire to use ESM only ?
Reproduction
- launch histoire with vite 5.x+
System Info
System:
OS: macOS 13.6.4
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 4.44 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
pnpm: 7.30.0 - /usr/local/bin/pnpm
Browsers:
Chrome: 121.0.6167.139
Edge: 121.0.2277.98
Safari: 17.3
npmPackages:
@histoire/controls: 0.17.9 => 0.17.9
@histoire/plugin-vue: 0.17.9 => 0.17.9
@vitejs/plugin-vue: 5.0.3 => 5.0.3
histoire: 0.17.9 => 0.17.9
vite: 5.0.12 => 5.0.12
Used Package Manager
npm
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue 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.
- [X] The provided reproduction is a minimal reproducible example of the bug.