Building deeply nested html with vue-cli takes forever

后端 未结 4 1253
栀梦
栀梦 2020-12-13 10:33

I found that vue-cli (2.9.6, but 3.0.0 beta* has the same issue) \'s building process takes forever once the template\'s html gets relativelly deep.

For example, I j

4条回答
  •  隐瞒了意图╮
    2020-12-13 11:08

    I do not have any particular issue with your 25 nested

    's: (below example with Vue runtime compiler, so that you can easily test it directly in your browser)

    new Vue({
      el: '#app',
      template: '#app-template',
    });
    #app div {
      border: 1px solid grey;
      padding: 1px;
    }
    
    
    

    Here is a demo with a Vue CLI project on CodeSandbox, probably closer to your example: https://codesandbox.io/s/v3knpl447l

    (i.e. it precompiles the templates, so the building process actually happens on CodeSandbox server)

提交回复
热议问题