zoukankan      html  css  js  c++  java
  • vuejs

    When using .vue file for my custom components it throws an vue warning.
    [Vue warn]: Failed to mount component: template or render function not defined. (found in root instance)

    https://vuejs.org/v2/guide/installation.html

    Standalone vs. Runtime-only Build

    There are two builds available, the standalone build and the runtime-only build. The difference being that the former includes the template compiler and the latter does not.

    The template compiler is responsible for compiling Vue template strings into pure JavaScript render functions. If you want to use the template option, then you need the compiler.

    • The standalone build includes the compiler and supports the template option. It also relies on the presence of browser APIs so you cannot use it for server-side rendering.

    • The runtime-only build does not include the template compiler, and does not support the template option. You can only use the render option when using the runtime-only build, but it works with single-file components, because single-file components’ templates are pre-compiled into render functions during the build step. The runtime-only build is roughly 30% lighter-weight than the standalone build, weighing only 16.39kb min+gzip.

    By default, the NPM package exports the runtime-only build. To use the standalone build, add the following alias to your Webpack config:

    resolve: {
      alias: {
        'vue$': 'vue/dist/vue.js'
      }
    }
  • 相关阅读:
    CMD 已存在的表, 没有主键的 添加主键属性
    回调函数 call_back
    在Ubuntu下安装MySQL,并将它连接到Navicat for Mysql
    F查询和Q查询,事务及其他
    Djabgo ORM
    Diango 模板层
    Django视图系统
    Django简介
    Web 框架
    HTTP协议
  • 原文地址:https://www.cnblogs.com/alexandra/p/6089457.html
Copyright © 2011-2022 走看看