-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create rollup config for lighthouse-chart
lighthouse-chart.js uses a different entrypoint that is not gulliver.js. It uses loader.js, and a hack was being used that added Loader as variable on Window. By create a rollup config for lighthouse-chart, we can remove this hack.
- Loading branch information
Showing
8 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/coverage | ||
/third_party | ||
/public/js/gulliver.js | ||
/public/js/lighthouse-chart.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import babel from 'rollup-plugin-babel'; | ||
import uglify from 'rollup-plugin-uglify'; | ||
import nodeResolve from 'rollup-plugin-node-resolve'; | ||
import commonsjs from 'rollup-plugin-commonjs'; | ||
|
||
export default { | ||
entry: './public/js/lighthouse-chart.es6.js', | ||
plugins: [ | ||
babel({exclude: 'node_modules/**'}), | ||
uglify(), | ||
nodeResolve(), | ||
commonsjs() | ||
], | ||
// Quiet warning: https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined | ||
context: 'window', | ||
targets: [ | ||
{ | ||
dest: './public/js/lighthouse-chart.js', | ||
// Fixes 'navigator' not defined when using Firebase and strict mode: | ||
// http://stackoverflow.com/questions/31221357/webpack-firebase-disable-parsing-of-firebase | ||
useStrict: false, | ||
format: 'iife', | ||
sourceMap: true | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters