question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Storybook should use `dist/` Rollup bundle, not build all over again

See original GitHub issue

Current 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:open
  • Created 3 years ago
  • Reactions:1
  • Comments:24 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
kylemhcommented, Aug 22, 2020

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.

2reactions
agilgur5commented, Jul 19, 2020

@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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found