From 2debb9f4cbb6003e7d24444cf049b45582d82ff1 Mon Sep 17 00:00:00 2001 From: Jeff Yang <32727188+ydcjeff@users.noreply.github.com> Date: Wed, 23 Feb 2022 03:00:03 +0630 Subject: [PATCH] fix: allow optional trailing comma in asset `import.meta.url` (#6983) Co-authored-by: bluwy --- packages/playground/assets/index.html | 45 +++++++++++++++++++ .../src/node/plugins/assetImportMetaUrl.ts | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/packages/playground/assets/index.html b/packages/playground/assets/index.html index f3b9a0b372a608..ef673053abad27 100644 --- a/packages/playground/assets/index.html +++ b/packages/playground/assets/index.html @@ -137,6 +137,14 @@

new URL('...', import.meta.url)

+

new URL('...', import.meta.url,) (with comma)

+ + + +

new URL('...', import.meta.url,) (with comma + new line)

+ + +

new URL(`./${dynamic}`, import.meta.url)

@@ -147,6 +155,16 @@

new URL(`./${dynamic}`, import.meta.url)

+

new URL(`./${dynamic}`, import.meta.url,) (with comma)

+

+ + +

+

+ + +

+

simple script tag import-expression