Storybook should use `dist/` Rollup bundle, not build all over again
See original GitHub issueCurrent Behavior
If you want enhance the build (like adding fonts for instance), you currently have to do that in two places:
.storybook/main.js
where you would use Webpack’s ‘file-loader’tsdx.config.js
where you would use ‘@rollup/plugin-url’
Desired Behavior
I would ideally not have to modify the Storybook build to pull in the fonts at all. By the very nature of telling rollup to include the fonts, Webpack would get them because it would be including the compiled output that lives in dist.
Suggested Solution
Who does this impact? Who is this for?
I’m not sure.
Describe alternatives you’ve considered
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:24 (13 by maintainers)
Top Results From Across the Web
Creating a React Component Library using Rollup, Typescript ...
Building the component library using TypeScript allows you to easily bundle the types of your components for no extra work!
Read more >Does rollup bundle node_modules into bundle.js?
Try this: import commonjs from "rollup-plugin-commonjs"; import nodeResolve from "rollup-plugin-node-resolve"; export default { entry ...
Read more >How to Create and Publish a React Component Library
If you want to use esm, first you need to rename your config file to rollup. config.
Read more >Rollup Config for React Component Library With TypeScript + ...
At the same time, I will put down some notes for the various Rollup plugins being used, so we know exactly which plugin...
Read more >Creating a React Component Library with TypeScript ...
You can remove start , build and eject scripts from package.json because we will use Storybook to start our project and Rollup to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s released, @dgreene1 !
I doubt this will be possible given the compilation process involved around
react-docgen-typescript
.I spoke with @shilman about this (thanks for the reminder @agilgur5), and he suggested there may be a way to do upstream changes to
react-docgen-typescript-plugin
such that typedefs are enough to automatically generate docs. There’s definitely still space for this issue, as it sounds like the Storybook team wants to give people the ability to leverage Storybook with prebuilt packages; however, I doubt this issue will be resolved for some time.@kylemh to clarify, I’m in fact not a “Member” of the org, I’m a “Collaborator” of the repo. “Collaborators” have a very limited set of permissions, basically write access and some community moderation things. Adding “Members” to “Teams” also allows one to add more fine-grained permissions, for instance, issue triage but not write-access, write-access but not admin. Branch protection also isn’t set up (and I don’t have permissions to set it), so write access means ability to change main branch as well (whereas PR-only is best practice).