2019-09-16 19:06:45 +00:00
|
|
|
// This package is the "full-build" that includes both the runtime
|
|
|
|
// and the compiler. For now we are just exporting everything from the runtome
|
|
|
|
// AND the compiler.
|
|
|
|
|
|
|
|
// TODO hook up the runtime to compile templates on the fly
|
|
|
|
|
2019-09-20 04:12:37 +00:00
|
|
|
import { compile as baseCompile, CompilerOptions } from '@vue/compiler-dom'
|
|
|
|
|
|
|
|
export function compile(template: string, options?: CompilerOptions): Function {
|
|
|
|
const { code } = baseCompile(template, options)
|
|
|
|
return new Function(`with(this){return ${code}}`)
|
|
|
|
}
|
|
|
|
|
2018-10-26 19:44:50 +00:00
|
|
|
export * from '@vue/runtime-dom'
|
2019-09-04 00:51:42 +00:00
|
|
|
|
2019-09-17 15:57:25 +00:00
|
|
|
if (__BROWSER__ && __DEV__) {
|
2019-09-04 00:51:42 +00:00
|
|
|
console[console.info ? 'info' : 'log'](
|
|
|
|
`You are running a development build of Vue.\n` +
|
|
|
|
`Make sure to use the production build (*.prod.js) when deploying for production.`
|
|
|
|
)
|
|
|
|
}
|