-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chris Garrett
committed
Feb 6, 2019
1 parent
df39f05
commit 6f95d66
Showing
5 changed files
with
91 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const Rollup = require('broccoli-rollup'); | ||
const writeFile = require('broccoli-file-creator'); | ||
const resolve = require('rollup-plugin-node-resolve'); | ||
const commonjs = require('rollup-plugin-commonjs'); | ||
|
||
module.exports = function polyfills() { | ||
let polyfillEntry = writeFile( | ||
'polyfill.js', | ||
` | ||
require("core-js/modules/es6.symbol"); | ||
require("core-js/modules/es6.object.to-string"); | ||
` | ||
); | ||
|
||
return new Rollup(polyfillEntry, { | ||
rollup: { | ||
input: 'polyfill.js', | ||
output: { | ||
file: 'polyfill.js', | ||
name: 'polyfill', | ||
format: 'iife', | ||
}, | ||
plugins: [resolve(), commonjs()], | ||
}, | ||
}); | ||
}; |
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