You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We use Typescript and to be able to have a better split between our dev/build dependencies and the dependencies the app uses we've split our projects into two "packages". Something like this:
We then do something like node build.js storybook to actually run stuff.
Since the buildsystem runs in Node we want TypeScript types for Node in that environment, but not for the app since that runs in the browser and not in Node. This isn't a problem for modules that you manually import, but becomes a problem for global types such as the Node types.
Storybook, webpack and other build tools are installed in the buildsystem/package.json whereas React and other runtime dependencies are installed in src/package.json. Some packages are installed in both (like Typescript) but they are very few.
This means that we want to launch Storybook from the buildsystem, and that works quite well except for the manager webpack config. The preview/app webpack config isn't a problem since we have full control over it (we use the standalone mode).
Describe the solution you'd like
The blocker for us currently is that we can't change anything in the manager webpack config which means that the Storybook manager can't find the babel-loader that's located in /buildsystem/node_modules and not in /node_modules. Which the manager assumes since the CWD is / for the build process.
So we'd like a way to tell Storybook where to look for loaders for the manager (and perhaps other dependencies as well).
Describe alternatives you've considered
Webpack by default assumes that loaders are located in /node_modules as well but we override that in the preview/app config by using resolveLoaders which works well. If we could in some way change/manipulate the manager config we could add resolveLoaders there.
That understandably might not be something this project wants to expose, since the manager is purely internal and exposing the config would make it harder to change. So another option would be to add another config parameter of where Storybook should try to resolve dependencies.
Are you able to assist bring the feature to reality?
Yes!
The text was updated successfully, but these errors were encountered:
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
Is your feature request related to a problem? Please describe.
We use Typescript and to be able to have a better split between our dev/build dependencies and the dependencies the app uses we've split our projects into two "packages". Something like this:
We then do something like
node build.js storybook
to actually run stuff.Since the buildsystem runs in Node we want TypeScript types for Node in that environment, but not for the app since that runs in the browser and not in Node. This isn't a problem for modules that you manually import, but becomes a problem for global types such as the Node types.
Storybook, webpack and other build tools are installed in the
buildsystem/package.json
whereas React and other runtime dependencies are installed insrc/package.json
. Some packages are installed in both (like Typescript) but they are very few.This means that we want to launch Storybook from the buildsystem, and that works quite well except for the manager webpack config. The preview/app webpack config isn't a problem since we have full control over it (we use the standalone mode).
Describe the solution you'd like
The blocker for us currently is that we can't change anything in the manager webpack config which means that the Storybook manager can't find the
babel-loader
that's located in/buildsystem/node_modules
and not in/node_modules
. Which the manager assumes since the CWD is/
for the build process.So we'd like a way to tell Storybook where to look for loaders for the manager (and perhaps other dependencies as well).
Describe alternatives you've considered
Webpack by default assumes that loaders are located in
/node_modules
as well but we override that in the preview/app config by usingresolveLoaders
which works well. If we could in some way change/manipulate the manager config we could addresolveLoaders
there.That understandably might not be something this project wants to expose, since the manager is purely internal and exposing the config would make it harder to change. So another option would be to add another config parameter of where Storybook should try to resolve dependencies.
Are you able to assist bring the feature to reality?
Yes!
The text was updated successfully, but these errors were encountered: