Aliaksei Shytkin
Aliaksei Shytkin

Reputation: 425

How to make webpack to produce only one file and include all chunks?

I'd like to have webpack configuration, which merges everything in one file despite defined chunks. It means it should treat

require.ensure(["./AsyncModule"], (require) => {
    var something = require('./AsyncModule');
});

the same way it treats

var something = require('./AsyncModule');

Is there any plugin or setting for that?

Upvotes: 0

Views: 446

Answers (1)

Aliaksei Shytkin
Aliaksei Shytkin

Reputation: 425

Hm, it seems that I should use

    new webpack.optimize.LimitChunkCountPlugin({
        maxChunks: 1
    })

Sorry :)

Upvotes: 3

Related Questions