From: Evan You Date: Mon, 29 Mar 2021 04:32:28 +0000 (-0400) Subject: workflow(sfc-playground): attach filename X-Git-Tag: v3.0.10~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb937e90332f35821a8ba0746969886738bedf69;p=thirdparty%2Fvuejs%2Fcore.git workflow(sfc-playground): attach filename --- diff --git a/packages/sfc-playground/src/store.ts b/packages/sfc-playground/src/store.ts index 2328d52af6..05f6f5fce4 100644 --- a/packages/sfc-playground/src/store.ts +++ b/packages/sfc-playground/src/store.ts @@ -187,6 +187,7 @@ async function compileFile({ filename, code, compiled }: File) { } if (finalCode) { + finalCode += `\n${COMP_IDENTIFIER}.__file = ${JSON.stringify(filename)}` finalCode += `\nexport default ${COMP_IDENTIFIER}` compiled.js = finalCode.trimStart() }