build: adjust compiler-core export to avoid collision

This commit is contained in:
Evan You 2019-09-26 11:51:04 -04:00
parent 3bba461128
commit 7c030ee899
3 changed files with 5 additions and 7 deletions

View File

@ -1,4 +1,4 @@
import { compile } from '../src'
import { baseCompile as compile } from '../src'
import { SourceMapConsumer, RawSourceMap } from 'source-map'
describe('compiler: integration tests', () => {

View File

@ -14,7 +14,9 @@ import { transformStyle } from './transforms/transformStyle'
export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions
export function compile(
// we name it `baseCompile` so that higher order compilers like @vue/compiler-dom
// can export `compile` while re-exporting everything else.
export function baseCompile(
template: string | RootNode,
options: CompilerOptions = {}
): CodegenResult {

View File

@ -1,8 +1,4 @@
import {
compile as baseCompile,
CompilerOptions,
CodegenResult
} from '@vue/compiler-core'
import { baseCompile, CompilerOptions, CodegenResult } from '@vue/compiler-core'
import { parserOptionsMinimal } from './parserOptionsMinimal'
import { parserOptionsStandard } from './parserOptionsStandard'