[Bug]: Importing anything that contains a word raw
in NextJS+Storybook project from ant-design makes every other import null
#26991
Labels
Describe the bug
There is a weird bug that happens in a project with latest NextJS 14 + Stroybook + Ant-Design. In Next everything works as expected but when I am trying to run storybook some imports from Ant-Design do not work. For instance this code works when I run NextJS server and doesn't work in Storybook (Drawer is null):
After some experimenting I found that problem arise only with ant-design components that have the word
raw
in them. So, importing Button works but Drawer doesn't.Note:
transpilePackages
andoptimizePackageImports
to make ant-design work with NextJS. So probably bug is somewhere in@storybook/nextjs
rxjs
. Maybe this is because of the next's internal optimizations for these packagesTo Reproduce
Reproduction repository
Here I:
System
Additional context
Error screenshot, but it just says that all imports from ant-design are empty:
![error](https://private-user-images.githubusercontent.com/4057095/326750268-4982b3f1-772b-4435-92ff-2b1c98c16f07.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NzMwNjAsIm5iZiI6MTczOTc3Mjc2MCwicGF0aCI6Ii80MDU3MDk1LzMyNjc1MDI2OC00OTgyYjNmMS03NzJiLTQ0MzUtOTJmZi0yYjFjOThjMTZmMDcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTdUMDYxMjQwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjdjNmUwNzU2ZjQ2ODg3YmYzMWFkODQ0MDNiZjliNzYxOTQxMmZlMmE4YTE2ZTg4N2UyZjhmZDgyYmI0NzMwNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Eru5zW17JM0uLPl5AjNjp_cR7eigehvzXcQvyWE4ZRc)
The text was updated successfully, but these errors were encountered: