How to include path in compilierOptions in tsconfig #710
-
I'm trying to replicate using @/panda/css in my codebase. Here's what I have:
But when I launch storybook, I keep on getting:
Any ideas? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This is mainly related to the tsconfig path not being detected correctly. Two things you can do:
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
const config = {
// ...
webpackFinal: (config) => {
config.resolve ??= {}
config.resolve.plugins ??= []
config.resolve.plugins.push(
new TsconfigPathsPlugin({
extensions: config.resolve.extensions,
}),
)
return config
},
}
export default config |
Beta Was this translation helpful? Give feedback.
-
I spent the morning on this and can't get any progress. My storybook main.js
The tsconfig.json for the package:
And yet, I still get an error:
Not sure how to resolve this. So hoping fresh eyes can help... |
Beta Was this translation helpful? Give feedback.
-
Closing this as I reached an impasse with this. Even the guys over at the SB discord couldn't help. It's probably due to my use case being in a yarn workspace. |
Beta Was this translation helpful? Give feedback.
-
With 0.5.0 this is a non issue now. |
Beta Was this translation helpful? Give feedback.
This is mainly related to the tsconfig path not being detected correctly. Two things you can do:
baseUrl
is set in your project