L
L
LionG2020-09-21 00:21:51
webpack
LionG, 2020-09-21 00:21:51

Is there any plugin for parallel execution of an array of webpack plugins?

//default
plugins: [
  //prerenders
  ...['ru', 'en'].map((lang) => {
    return new PrerenderSPAPlugin(...)
  })
]
/*
1st: 200ms
2st: 200ms
total: 400ms
*/

//with some magic
plugins: [
  new someMagicParallelPlugin(
    //array prerenders
    ['ru', 'en'].map((lang) => {
      return new PrerenderSPAPlugin(...)
    }),
    //threads limit
    8
  )
]
/*
1st: 200ms
2st: 200ms
total: 200ms
*/

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question