Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook takes 13-20 mins to do its initial load! #2095

Closed
tourshi opened this issue Oct 19, 2017 · 5 comments
Closed

Storybook takes 13-20 mins to do its initial load! #2095

tourshi opened this issue Oct 19, 2017 · 5 comments

Comments

@tourshi
Copy link

tourshi commented Oct 19, 2017

Hi guys,

I've set up storybook for my ui library and it takes 13-18minutes to load (depending on the machines that I've tried it on). After it's creates /node_modules/.cache/ folder, the load times are 9-10sec. I'm wondering if this behaviour is normal or is something amiss in my configuration files.

What happens is, it starts off pretty normally and the progress steadily reaches 66% and then stalls there for 11-12mins at least and then quickly continues to a 100%.

STORYBOOK_ENV=development start-storybook -p 9001 -s ./source -c .storybook


@storybook/react v3.2.12

=> Loading static files from: /Users/ZZZ/UI-Components/source .
=> Loading custom .babelrc
=> Loading custom addons config.
=> Loading custom webpack config (extending mode).
 66% building modules 663/699 modules 36 active ...s/node_modules/function-bind/index.js

Any insight into this would be greatly appreciated!

Here is a my webpack.config.js file (in ./storybook)

const path = require('path');

module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpe?g|gif|svg|ico)$/i,
        include: path.resolve(__dirname, '../source/images'),
        exclude: /node_modules/,
        loader: "file-loader",
        options: {
          name: '[name].[ext]',
          outputPath: 'images/'
        }
      },
      {
        test: /\.(eot|svg|ttf|woff|woff2)$/,
        include: path.resolve(__dirname, '../source/fonts'),
        exclude: [/node_modules/, /images\//],
        loader: "file-loader",
        options: {
          name: '[name].[ext]',
          outputPath: 'fonts/'
        }
      },
      {
        test: /\.ico$/,
        include: path.resolve(__dirname, '../source/icons'),
        exclude: /node_modules/,
        loader: "file-loader",
        options: {
          name: 'icons/[name].[ext]',
          outputPath: 'icons/'
        }
      },
      {
        test : /\.styl?/,
        loaders: ['style-loader','css-loader','resolve-url-loader','stylus-loader'],
        include: path.resolve(__dirname, '../source/styles')
      }
    ]
  }
}
@danielduan
Copy link
Member

danielduan commented Oct 28, 2017

edit: made a mistake, your config looks correct.

maybe try an exclude node_modules on your .styl loader?

@tourshi
Copy link
Author

tourshi commented Nov 3, 2017

Thanks, danielduan

I gave that suggestion a try. It didn't seem to help. I appreciate your help though.

@stale
Copy link

stale bot commented Dec 18, 2017

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 60 days. Thanks!

@stale stale bot added the inactive label Dec 18, 2017
@stale
Copy link

stale bot commented Jan 2, 2018

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!

@paulcpk
Copy link

paulcpk commented Mar 13, 2019

Might be a duplicate: #3968

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants