How to create IE11 Bundles with Webpack 5 and Babel 7
问题 How can we compile modern JavaScript into backwards-compatible JavaScript bundles that can be used with Internet Explorer 11 (ie11)? Specifically, how can we do this with the latest versions of Webpack 5 and Babel 7? 回答1: Here's the most minimal configuration I could create, with a test file that's included to test with IE 11. Download on GitHub. package.json { "browserslist": [ "ie 11" ], "scripts": { "dev": "webpack -w", "build": "webpack" }, "devDependencies": { "@babel/core": "^7.12.9", "