Skip to content

Commit

Permalink
feat(sfc): parse needMap compat
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 20, 2022
1 parent 8ab0074 commit d3916b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/compiler-sfc/src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export interface SFCParseOptions {
compilerParseOptions?: VueTemplateCompilerParseOptions
sourceRoot?: string
sourceMap?: boolean
/**
* @deprecated use `sourceMap` instead.
*/
needMap?: boolean
}

export function parse(options: SFCParseOptions): SFCDescriptor {
Expand All @@ -32,7 +36,8 @@ export function parse(options: SFCParseOptions): SFCDescriptor {
compiler,
compilerParseOptions = { pad: false } as VueTemplateCompilerParseOptions,
sourceRoot = '',
sourceMap = true
needMap = true,
sourceMap = needMap
} = options
const cacheKey = hash(
filename + source + JSON.stringify(compilerParseOptions)
Expand Down

0 comments on commit d3916b6

Please sign in to comment.