2020-04-07 20:54:46 +10:00
|
|
|
The steps are essentially:
|
2021-04-09 15:19:27 +10:00
|
|
|
1) Install required packages
|
2020-04-07 20:54:46 +10:00
|
|
|
|
2021-04-09 15:19:27 +10:00
|
|
|
npm install --no-save mdn-polyfills url-polyfill regenerator-runtime core-js-bundle
|
2020-04-07 20:54:46 +10:00
|
|
|
|
|
|
|
2) Join them all together:
|
|
|
|
|
|
|
|
cd node_modules/mdn-polyfills
|
|
|
|
cat CustomEvent.* Element.* Function.* HTMLCanvasElement.* MouseEvent.* Node.prototype.* NodeList.* > ../../lib/polyfills/polyfill.js
|
2021-04-09 15:19:27 +10:00
|
|
|
|
2020-04-07 20:54:46 +10:00
|
|
|
cd ../url-polyfill/
|
|
|
|
cat url-polyfill.min.js >> ../../lib/polyfills/polyfill.js
|
|
|
|
|
2021-04-09 15:19:27 +10:00
|
|
|
cd ../regenerator-runtime
|
|
|
|
cat runtime.js >> ../../lib/polyfills/polyfill.js
|
|
|
|
|
|
|
|
cd ../core-js-bundle
|
|
|
|
cat minified.js >> ../../lib/polyfills/polyfill.js
|
|
|
|
sed -i '/\/\/\# sourceMappingURL=minified.js.map/d' ../../lib/polyfills/polyfill.js
|
|
|
|
|
2020-04-07 20:54:46 +10:00
|
|
|
3) Uninstall the packages again
|
|
|
|
|
2021-04-09 15:19:27 +10:00
|
|
|
npm uninstall --no-save mdn-polyfills url-polyfill regenerator-runtime core-js-bundle
|