1

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

Tal
  • 1,091
  • 12
  • 25

1 Answers1

0

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

Lesha Ogonkov
  • 1,218
  • 8
  • 20