下一个构建命令不会忽略 *.stories.tsx 文件
我正在尝试构建 nextjs
项目,该项目具有与组件本身并排的 [componentName].stories.tsx
。由于这些故事中的打字稿错误,运行 next build
失败。接下来我想忽略 storybook
文件。是否可能,如果可以,我该怎么做?
I am trying to build nextjs
project which has [componentName].stories.tsx
side by side with component itself. Running next build
fails because of typescript errors in these stories. I want next to ignore storybook
files. Is it possible and if yes how do I do it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据您的具体情况,Next.js 确实提供了解决方案:
我们遇到了与您类似的问题,但这只是页面文件夹中的故事的问题。该解决方案适用于我们的项目。
Depending on the specifics of your situation, Next.js does provide a solve:
We had a similar issue to yours, but it was only a problem with stories that were in the pages folder. This solution worked for our project.
请将故事添加到 lint 文件中的忽略模式数组中,以下是一个示例:
Please add the stories into ignored pattern array in your lint file, here is an example: