Search code examples
vue.jsvuejs2vue-clivue-cli-3

about vue-cli 3.x main.js


In vue-cli 2.x, when you create a vue object in main.js, I remember that the template option was available.

In vue-cli 3.x, however, using the template option causes an error and you must use the render function.

I wonder why.


Solution

  • vue ui execute project preset add/remove(project setting) runtimeCompiler : true setting

    or vue.config.js write

    module.exports = {
    runtimeCompiler: true
    }