B
B
bormor2019-11-14 15:14:32
JavaScript
bormor, 2019-11-14 15:14:32

Slow build of Vue project. What are the ways to speed it up?

There is a legacy project in VueJS.
Hot Reloading after updating the code works extremely slowly (7-12 seconds).
How can you speed up the build?
What profiling tools are there to find the bottleneck?
How to google solutions?
The webpack config is standard for vue cli, with a few tweaks:

module.exports = {
  productionSourceMap: false,
  runtimeCompiler: true,
  configureWebpack: config => {
    if (process.env.NODE_ENV !== 'production') {
      config.devtool = 'source-map'
    }
  },
  chainWebpack: config => {
    // Use file loader for documents (currently, PDF)
    config.module
      .rule('documents')
      .test(/\.pdf$/)
      .use('file-loader')
      .loader('file-loader')
      .end()
  }
}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Anton, 2019-11-14
@Fragster

node_modules in a separate chunk? routes in separate chunks?

V
Vladimir Korotenko, 2019-11-14
@firedragon

Ram disk, and 4-7 seconds for me, for example, the bundle is assembled.

P
profesor08, 2019-11-14
@profesor08

Without the project itself, no one will say anything intelligible and not captain's. Maybe you have babel in dev mode five times everything with a minifier in turn.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question