[Vuejs]-How could I mount the app in to index.html

0👍

SFCs require a build step and is recomended

When using standard Vue without a build step and mounting to in-DOM templates, it is much less optimal because:

  1. We have to ship the Vue template compiler to the browser (13kb extra size)
  2. The compiler will have to retrieve the template string from already instantiated DOM
  3. The compiler then compiles the string into a JavaScript render function
  4. Vue then replaces existing DOM templates with new DOM generated from the render function.

If you still don’t want a build step, take a look at petite-vue

Leave a comment