Nary a Package Missing

    webpack-gimbal-plugin

    0.1.6 • Public • Published

    PRs Welcome MIT Licensed Powered by Modus_Create

    Webpack Gimbal Plugin

    Gimbal integration for Webpack. Uses the same configuration as Gimbal to simplify performance budgeting in production builds.

    Getting Started

    You can install Gimbal globally using npm or yarn:

    # with npm 
    npm install webpack-gimbal-plugin
     
    # or with yarn 
    yarn add webpack-gimbal-plugin

    Add it to your Webpack configuration as you would with any other plugin:

    var GimbalPlugin = require('webpack-gimbal-plugin');
     
    {
      plugins: [new GimbalPlugin()];
    }

    Configuration

    Gimbal emits a warning or an error to a webpack compilation. It defaults to a warning for each failed audit. You can change that to an error by setting bail: true in GimbalPlugin configuration.

    {
      plugins: [
        // Emit errors for failed audits
        new GimbalPlugin({ bail: true }),
      ];
    }

    Note: webpack config also uses bail configuration to break execution on errors. GimbalPlugin uses the same verbiage, but it will not bubble up to Webpack's config. It's entirely isolated to this usecase.

    Gimbal Configuration Example

    You can use Gimbal configuration in .gimbalrc.yml like the following:

    configs:
      heap-snapshot:
        threshold:
          Documents: 5
          Frames: 2
          JSHeapTotalSize: 23356000
          JSHeapUsedSize: 15068000
          Nodes: 800
          RecalcStyleCount: 9
      lighthouse:
        threshold:
          accessibility: 93
          'best-practices': 90
          performance: 50
          pwa: 75
          seo: 100
      size:
        path: ./build/precache-*.js
          maxSize: 500 B
        path: ./build/static/js/*.chunk.js
          maxSize: 1 MB
        path: ./build/static/js/runtime*.js
          maxSize: 10 KB
        path: ./build/
          maxSize: 18 MB

    Questions and Support

    If you have a problem running Gimbal, please submit an issue. The more information you give us the faster we can get back with a good answer.

    Modus Create

    Modus Create is a digital product consultancy. We use a distributed team of the best talent in the world to offer a full suite of digital product design-build services; ranging from consumer facing apps, to digital migration, to agile development training, and business transformation.

    Modus Create

    This project is part of Modus Labs.

    Modus Labs

    Licensing

    This project is MIT licensed.

    Install

    npm i webpack-gimbal-plugin

    DownloadsWeekly Downloads

    7

    Version

    0.1.6

    License

    MIT

    Unpacked Size

    11.9 kB

    Total Files

    7

    Last publish

    Collaborators

    • grgur