nx: "Import type" stopped working in "@nrwl/react": "14.7.6" for storybook
Current Behavior
After updating to “@nrwl/react”: “14.7.6” from “@nrwl/react”: “14.7.5” and trying to run storybook I started to get an error in “import type” smth.
Expected Behavior
Storybook runs as normal, no errors. It is regression
Steps to Reproduce
- use import type in some storybook file
- update @nrwl/react from 14.7.5 to 14.7.6 (14.7.9 still broken)
- start storybook
- get this error specified in failure logs
example repo https://github.com/artra/nx-storybook-error
nx serve smth:storybook to reproduce
Failure Logs
Unexpected token, expected "from" (9:12)
7 | var __LOCATIONS_MAP__ = {"AccountDetailsStory":{"startLoc":{"col":64,"line":11},"endLoc":{"col":102,"line":11},"startBody":{"col":64,"line":11},"endBody":{"col":102,"line":11}}};
8 |
> 9 | import type { Story, Meta } from '@storybook/react';
Environment
Storybook
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 24 (16 by maintainers)
I’m looking into this today, if I don’t figure it out let’s open another bug. I’ve narrowed down the problem, the title does not depict it correctly!
@mandarini I’m facing the same issue and I can’t remove
@nrwl/react/plugins/storybookfrom the addons because when I do it all my imports declared in my tsconfig files stop working (egModule not found: Error: Can't resolve '@front/components/inputs' ...)