WIP: Fix code-block-buttons.js to work in IE11
- Transpile
code-block-buttons.jswith babel and includebabel-polyfill - Minify bundled scripts using
babel-minify-webpack-plugin
WIP because not tested in an actual IE11 browser yet(currently don't have one, will test with Netlify link in a few days)
Deploy preview for babel failed.
Built with commit 224a96f58c5ee49215ff476cb95664909dd05fd1
https://app.netlify.com/sites/babel/deploys/5b72cc02b312747ef9bc50c4
@gyujincho just took at look at this in IE11... I think we can avoid transpiling, as the only thing that seems to be breaking is:
document.querySelectorAll(codeBlockSelector).forEach(...)
We can probably just copy/paste a polyfill (like this one).
(Also looks like we need to fix the css for the copy button for IE11)
Even if we fix this one file, there are more issues in order to get stuff working in IE11. For example docusaurus ships template strings in some files which get directly sent to browser.
https://github.com/facebook/Docusaurus/blob/master/packages/docusaurus-1.x/lib/static/js/codetabs.js
It is probably not worth fixing imho.