entry-runtime-with-compiler.js 入口文件为Vue重写了$mount方法,并添加了compile方法。
$mount
$mount 方法支持传入 2 个参数。
- 第一个是 el,它表示挂载的元素,可以是字符串,也可以是 DOM 对象。第二个参数是和服务端渲染相关,在浏览器环境下不需要传第二个参数。
- 如果Vue实例option中没有
render
函数,会把option.template
中的内容通过编辑器compileToFunctions
编译成render函数,然后再调用Vue的$mount方法。
compile
--暂时没看明白,回头再看
参考资料
- Vue API
- Window.performance