profile
viewpoint

Ask questionsNew config test for `register` add ons

Describe the bug

using a register file in the add ons section generates a console error:

ERR! Addon value should end in /register OR it should be a valid preset https://storybook.js.org/docs/presets/introduction/
ERR! /Users/atanasster/storybook-addon-deps/dist/register.js

To Reproduce

module.exports = {
  addons: [require.resolve('./register')],
}  
storybookjs/storybook

Answer questions RuneKR

Hi. The solution does not work on a MacBook. Regex fails for absolute paths such as /User/Rune/some/nested/@at/here/register.js

useful!
source:https://uonfu.com/
answerer
Rune Rasmussen RuneKR New Zealand https://ords.io Passion for tactical tooling and software architecture
Github User Rank List