Closed Pitbi closed 3 years ago
One solution would be to run prettier on save or before compilation. I haven't tried it yet myself. What I did instead was to set an eslint rule to enforce semicolons (which I'd rather not do, but it prevents this issue).
Can someone provide a reproduction for this? If I had to guess, there’s a minor Webpack tweak that can be done to resolve this.
I came across the same problem,
You can see my config here: https://github.com/storybookjs/storybook/issues/10395#issue-598479946
Sorry for the late response. I finally stopped using storybook, but the config of @balazsorban44 is very close to mine and I had exactly the same error.
I encountered same problem.
Solved this problem by add newline at the end of files.
So I put eol-last
rule into eslint.
I think it should also work for those who don't like use eol-last rule. So I create a fix by adding a \n between the sourcefile and the try-catch block.
Hello,
During the storybook build, I have the following errors when I don't use semicolons in my code.
In this case, I solved the issue by adding semicolons to
title/index.tsx
. If I removereact-docgen-typescript-loader
, it "works" too but it's not the goal. :) My storybook config is identical to that presented in the official storybook doc.An idea?
Thx in advance.