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

431 views Asked by At

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?

1

There are 1 answers

0
Aliaksei Shytkin On

Hm, it seems that I should use

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

Sorry :)