Reputation: 1231
I am trying to add storybook with my nunjucks project. I am having my components in njk format. I am getting the below error -
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
Here is my storybook code -
export default {
title: 'Header',
};
import Head from './header.njk';
export const Top = () => {
return Head;
};
As storybook doesn't support nunjucks as per their Github site, i am also looking at the alternatives to the storybook for my nunjucks components.
Thanks for the help
Upvotes: 1
Views: 944
Reputation: 1238
You should setup storybook with custom webpack config, that should contain some webpack loader for nunjucks.
See more in official documentation https://storybook.js.org/docs/react/configure/webpack
Upvotes: 0