Gimbal source-map-explorer
Plugin
A Gimbal plugin to add Source Map Explorer auditing.
Installation
First, you need to install the plugin to your project:
npm install --save-dev @modus/gimbal-plugin-source-map-explorer
yarn add --dev @modus/gimbal-plugin-source-map-explorer
Next, you need to add the plugin to your Gimbal configuration file:
YAML
plugins:
- '@modus/gimbal-plugin-source-map-explorer'
JSON
{
"plugins": ["@modus/gimbal-plugin-source-map-explorer"]
}
JavaScript
modules.exports = {
plugins: ['@modus/gimbal-plugin-source-map-explorer'],
};
Configuration
By default, it will not check the sizes of the bundled files. You can check for file sizes within bundles using the bundles
config using glob syntax for the bundle file name and the files within the bundle:
plugins:
- plugin: '@modus/gimbal-plugin-source-map-explorer'
bundles:
- path: '**/main.*.js'
thresholds:
App.js: 450 B
index.js: 100 B
logo.svg: 250 B
serviceWorker.js: 300 B
<unmapped>: 150 B
- path: '**/2.*.js'
thresholds:
react/index.js: 50 B
object-assign/index.js: 1 KB
react-dom/index.js: 300 B
react/cjs/react.production.min.js: 7 KB
react-dom/cjs/react-dom.production.min.js: 110 KB
scheduler/index.js: 50 B
scheduler/cjs/scheduler.production.min.js: 5 KB
webpack/**/*.js: 150 B
<unmapped>: 150 B
- '!precache-manifest*'
- '!service-worker.js'
- '!**/runtime*.js'