Open trajano opened 1 year ago
I'm having a similar issue with vite 5, Storybook 7, and the latest version of this library (1.1.0). Building Storybook and running Storybook work fine, but when I go to look at my component that uses info from a .yml
file, I get Error: Cannot read properties of undefined (reading 'titleTooltip')
, where titleTooltip
is being accessed as content.instanceDetailsInsights.titleTooltip
, and content
is a content.yml
file that we are importing into the project that has our copy in it.
Here is where we're configuring the plugin in Storybook:
viteFinal: async config => {
return mergeConfig(config, {
resolve: {
alias: {
"@": path.resolve(path.dirname(__dirname), "src")
}
},
plugins: [ViteSvgr({ include: '**/*.svg' }), ViteYaml()]
});
},
When running with
npm run build-storybook
I getBut
npm run build
works correctly. Not really sure which part is causing the issue though.