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

Show how to skip imports for optional plugins #2627

Merged
merged 2 commits into from
Jan 3, 2019

Commits on Jan 3, 2019

  1. Show how to skip imports for optional plugins

    The most common Rollup plugins are pretty fast to import (by Node
    standards), but even those will commonly add on a handful of
    milliseconds, and it’s not unheard of to have imports literally take
    seconds. If you don’t need it, why load it? I think that this is a good
    pattern to recommend.
    
    eslint and stylelint are two good examples of unreasonably slow modules
    that will commonly be optional. stylelint can take a second or two, and
    eslint a few hundred milliseconds, because neither of them care enough
    about startup time. stylelint/stylelint#2454
    was me reporting it for stylelint. I wish more people used Rollup on
    their packages before submitting them to npm.
    chris-morgan committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    fcd8a6f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d272172 View commit details
    Browse the repository at this point in the history