This repository was archived by the owner on Feb 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +79
-0
lines changed Expand file tree Collapse file tree 5 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ # @bundle-analyzer/gatsby-plugin
2+
3+ Official Gatsby plugin for with [ Bundle Analyzer service] ( https://www.bundle-analyzer.com ) .
4+
5+ ## Install
6+
7+ ```
8+ npm install --save-dev @bundle-analyzer/gatsby-plugin
9+ ```
10+
11+ ## Usage
12+
13+ ** gatsby-config.js**
14+
15+ ``` js
16+ plugins: [
17+ {
18+ resolve: ' @bundle-analyzer/gatsby-plugin' ,
19+ options: { token: ' <repository-token>' },
20+ },
21+ ]
22+ ```
23+
24+ ## Options
25+
26+ ### token
27+
28+ You can specify the token using options or environment variable ` BUNDLE_ANALYZER_TOKEN ` .
29+
30+ ### configFile
31+
32+ You can specify a custom configuration file.
33+
34+ ## Complete documentation
35+
36+ 👉 [ See full documentation] ( https://docs.bundle-analyzer.com/ )
37+
38+ ## License
39+
40+ MIT
Original file line number Diff line number Diff line change 1+ // eslint-disable-next-line import/no-unresolved
2+ module . exports = require ( './lib/gatsby-node' )
Original file line number Diff line number Diff line change 1+ // noop
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @bundle-analyzer/gatsby-plugin" ,
3+ "description" : " Bundle Analyzer Gatsby plugin." ,
4+ "version" : " 0.3.1" ,
5+ "main" : " index.js" ,
6+ "repository" : " https://github.com/smooth-code/bundle-analyzer-javascript/tree/master/packages/gatsby-plugin" ,
7+ "author" : " Greg Bergé <berge.greg@gmail.com>" ,
8+ "publishConfig" : {
9+ "access" : " public"
10+ },
11+ "keywords" : [
12+ " gatsby" ,
13+ " gatsby-plugin" ,
14+ " bundle-analyzer" ,
15+ " bundlesize"
16+ ],
17+ "engines" : {
18+ "node" : " >=8"
19+ },
20+ "license" : " MIT" ,
21+ "scripts" : {
22+ "prebuild" : " rm -rf lib/" ,
23+ "build" : " babel --config-file ../../babel.config.js -d lib --ignore \" **/*.test.js\" src" ,
24+ "prepublishOnly" : " yarn run build"
25+ },
26+ "dependencies" : {
27+ "@bundle-analyzer/webpack-plugin" : " ^0.3.1"
28+ }
29+ }
Original file line number Diff line number Diff line change 1+ import BundleAnalyzerPlugin from '@bundle-analyzer/webpack-plugin'
2+
3+ exports . onCreateWebpackConfig = ( { actions } , options ) => {
4+ actions . setWebpackConfig ( {
5+ plugins : [ new BundleAnalyzerPlugin ( options ) ] ,
6+ } )
7+ }
You can’t perform that action at this time.
0 commit comments