|
|
@@ -1,14 +1,12 @@
|
|
|
+import config from './config'
|
|
|
import { compile } from './compiler/index'
|
|
|
import { getOuterHTML, query } from './util/index'
|
|
|
import Component from './instance/index'
|
|
|
|
|
|
export default function Vue (options) {
|
|
|
if (!options.render) {
|
|
|
- if (options.template) {
|
|
|
- options.render = compile(options.template)
|
|
|
- } else if (options.el) {
|
|
|
- options.render = compile(getOuterHTML(query(options.el)))
|
|
|
- }
|
|
|
+ const template = options.template || getOuterHTML(query(options.el))
|
|
|
+ options.render = compile(template, config.preserveWhiteSpace)
|
|
|
}
|
|
|
return new Component(options)
|
|
|
}
|