1 |
efrain |
1 |
The steps are essentially:
|
|
|
2 |
1) Install required packages
|
|
|
3 |
|
|
|
4 |
npm install --no-save mdn-polyfills url-polyfill regenerator-runtime core-js-bundle
|
|
|
5 |
|
|
|
6 |
2) Join them all together:
|
|
|
7 |
|
|
|
8 |
cd node_modules/mdn-polyfills
|
|
|
9 |
cat CustomEvent.* Element.* Function.* HTMLCanvasElement.* MouseEvent.* Node.prototype.* NodeList.* > ../../lib/polyfills/polyfill.js
|
|
|
10 |
|
|
|
11 |
cd ../url-polyfill/
|
|
|
12 |
cat url-polyfill.min.js >> ../../lib/polyfills/polyfill.js
|
|
|
13 |
|
|
|
14 |
cd ../regenerator-runtime
|
|
|
15 |
cat runtime.js >> ../../lib/polyfills/polyfill.js
|
|
|
16 |
|
|
|
17 |
cd ../core-js-bundle
|
|
|
18 |
cat minified.js >> ../../lib/polyfills/polyfill.js
|
|
|
19 |
sed -i '/\/\/\# sourceMappingURL=minified.js.map/d' ../../lib/polyfills/polyfill.js
|
|
|
20 |
|
|
|
21 |
3) Uninstall the packages again
|
|
|
22 |
|
|
|
23 |
npm uninstall --no-save mdn-polyfills url-polyfill regenerator-runtime core-js-bundle
|