mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
feat(sfc): parse needMap compat
This commit is contained in:
parent
8ab0074bab
commit
d3916b69b4
@ -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 {
|
||||
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user