From: Evan You Date: Thu, 28 Nov 2019 20:22:30 +0000 (-0500) Subject: chore: todos X-Git-Tag: v3.0.0-alpha.0~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=020e109abd0b29ee85d7b793afb9e0bd12750606;p=thirdparty%2Fvuejs%2Fcore.git chore: todos --- diff --git a/packages/compiler-sfc/__tests__/parse.spec.ts b/packages/compiler-sfc/__tests__/parse.spec.ts index 75ed119686..d3b5330a8c 100644 --- a/packages/compiler-sfc/__tests__/parse.spec.ts +++ b/packages/compiler-sfc/__tests__/parse.spec.ts @@ -8,11 +8,13 @@ describe('compiler:sfc', () => { test('style block', () => { const style = parse(`\n`) .styles[0] + // TODO need to actually test this with SourceMapConsumer expect(style.map).not.toBeUndefined() }) test('script block', () => { const script = parse(`\n`).script + // TODO need to actually test this with SourceMapConsumer expect(script!.map).not.toBeUndefined() }) }) diff --git a/packages/compiler-sfc/src/parse.ts b/packages/compiler-sfc/src/parse.ts index bb82d8a440..e37dbb981c 100644 --- a/packages/compiler-sfc/src/parse.ts +++ b/packages/compiler-sfc/src/parse.ts @@ -74,6 +74,7 @@ export function parse( styles: [], customBlocks: [] } + const ast = baseParse(source, { isNativeTag: () => true, getTextMode: () => TextModes.RAWTEXT @@ -86,6 +87,7 @@ export function parse( if (!node.children.length) { return } + // TODO handle pad option switch (node.tag) { case 'template': if (!sfc.template) {