0
votes

How can you bundle multiple .min.js vendor files together with WebPack 2? I'm starting with webpack and mostly one entry file is used to bundle everything together.

I just want the same behavior as the ASP.NET optimization bundling or the new ASP.NET core bundling with the bundleconfig.json file. https://docs.microsoft.com/en-us/aspnet/core/client-side/bundling-and-minification

The project will contain multiple different bundles.

1

1 Answers

0
votes

You can define multiple entries and within one entry you can pass an array. This way the files will be bundled together:

entry: {
    one: [
        "./src/a.js",
        "./src/b.js"
    ],
    two: "./src/app.js"        
},