Skip to content

Commit d3916b6

Browse files
committed
feat(sfc): parse needMap compat
1 parent 8ab0074 commit d3916b6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/compiler-sfc/src/parse.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export interface SFCParseOptions {
2323
compilerParseOptions?: VueTemplateCompilerParseOptions
2424
sourceRoot?: string
2525
sourceMap?: boolean
26+
/**
27+
* @deprecated use `sourceMap` instead.
28+
*/
29+
needMap?: boolean
2630
}
2731

2832
export function parse(options: SFCParseOptions): SFCDescriptor {
@@ -32,7 +36,8 @@ export function parse(options: SFCParseOptions): SFCDescriptor {
3236
compiler,
3337
compilerParseOptions = { pad: false } as VueTemplateCompilerParseOptions,
3438
sourceRoot = '',
35-
sourceMap = true
39+
needMap = true,
40+
sourceMap = needMap
3641
} = options
3742
const cacheKey = hash(
3843
filename + source + JSON.stringify(compilerParseOptions)

0 commit comments

Comments
 (0)