We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
其实这个问题在你使用vue-cli构建项目的时候是不会出现的,因为你在创建项目的构建过程中已经让你勾选了,然后会写入webpack.config.js中。
webpack.config.js
这就在这,会让你选择Vue的构建方式。
如果你勾选Runtime + Compiler就会出现如上的配置。
Runtime + Compiler
其实这里涉及到一个概念:
模版编译功能
运行时调用功能
为什么会有这种区分呢?
template
下面是官方话术:
独立构建包括编译和支持 template 选项。 它也依赖于浏览器的接口的存在,所以你不能使用它来为服务器端渲染。 运行时构建不包括模板编译,不支持 template 选项。运行时构建,可以用 render 选项,但它只在单文件组件中起作用,因为单文件组件的模板是在构建时预编译到 render 函数中,运行时构建只有独立构建大小的 30%,只有 16Kb min+gzip 大小。
所以两者最大的区别也就出来了
The text was updated successfully, but these errors were encountered:
No branches or pull requests
其实这个问题在你使用vue-cli构建项目的时候是不会出现的,因为你在创建项目的构建过程中已经让你勾选了,然后会写入
webpack.config.js
中。这就在这,会让你选择Vue的构建方式。
如果你勾选
Runtime + Compiler
就会出现如上的配置。其实这里涉及到一个概念:
模版编译功能
和运行时调用功能
运行时调用功能
为什么会有这种区分呢?
template
)为渲染函数(render),第二阶段是将实际函数的调用阶段。下面是官方话术:
所以两者最大的区别也就出来了
The text was updated successfully, but these errors were encountered: