I am new to storybooks. After updating angular to version 13 with typescript to version 4.6.4 Storybook is not building. It does not recognize the template import in all stories. Previously building and running a storybook was working. How to set the template properly through file import?
import template from '../action-list/action-list.html'; <- import HTML template
export default {
title: 'Common/Action list/Action list item',
component: ActionListItemComponent,
subcomponents: { ActionListComponent, ActionListItemMetaComponent },
parameters: { notes },
args: {
labels: actionListLabels,
alignment: 'right',
inline: true,
metaLabel: 'Updated',
metaValue: '09.09.2021',
},
argTypes: {
alignment: {
table: {
category: 'Playground',
}
},
},
} as Meta;
const Template: Story = (args: ActionListItemComponent) => {
return {
props: args,
template, <- set HTML template
};
};
ERROR: action-list-item.stories.ts:6:22 - error TS2307: Cannot find module '../action-list/action-list.html' or its corresponding type declarations. ERR! ERR! 6 import template from '../action-list/action-list.html';
The official documentation Storybook migration to Angular@13 says that there were quite drastic changes in the storybook builder, however, right now all example links in GitHub are broken. Maybe someone can share their experience migrating to Angular@13+