In this lesson, we'll configure webpack to use the Babel loader for our JavaScript files, allowing us to transpile our source files and generate a bundle for deploying our application.
My output file does have a string using the .concact method. However, the arrow function and const still there. Where there any updates done to the packages, that the expected output is now different. This is my output.
(()=>{"use strict";const o="Hello, ".concat(phrase,"!");console.log(o("World"))})();
The only time my code matches yours is when I add target: ["web", "es5"] to the webpack.config.js file and even then the output is !function(){"use strict";var o="Hello, ".concat(phrase,"!");console.log(o("World"))}();
if you encounter this error below : Error: Cannot find module 'fs/promises' make sure you have installed "babel-loader": "^8.0.5"