What is the meaning of the word babel-polyfill for the entrance to webpack entry?

module.exports = {

mode: dev ? "development" : "production",
context: path.join( __dirname, "" ),
devtool: dev ? "none" : "source-map",
entry: {
    //babel-polyfill 
    app: [ "babel-polyfill", "./src/client.js" ],
},
resolve: {
    modules: [
        path.resolve( "./src" ),
        "node_modules",
    ],
},
output: {
    path: path.resolve( __dirname, "dist" ),
    filename: "[name].bundle.js",
},
plugins,

};

Apr.24,2022

package babel-polyfill , you can use instance methods, such as Array.prototype.includes


babel-polyfill, as an entry file, and package all dependent libraries. If you do so, the size of the code will be greatly increased.


entry tells webpack which file to use as the starting point for building the dependency graph, such as specifying app.js as the entry,webpack to analyze the modules used by app.js, parsing the modules used in the module, and so on Finally, the front-end static resources are packaged into one or more static files according to certain rules. For more information, please see this article webpack

.
Menu