From 573fbd2e72c3246c2daadb8d8c053464c964cfe3 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 20 Sep 2021 11:21:06 -0400 Subject: [PATCH] feat: support ts in template expressions --- example/App.vue | 5 +- example/ScriptSetup.vue | 20 ++-- example/TypeScript.vue | 7 ++ example/tsconfig.json | 6 ++ example/webpack.config.js | 63 ++++++----- package.json | 10 +- src/index.ts | 18 ++-- src/pluginWebpack4.ts | 7 +- src/pluginWebpack5.ts | 8 +- src/resolveScript.ts | 6 +- src/templateLoader.ts | 8 ++ src/util.ts | 17 +++ yarn.lock | 220 +++++++++++++++++++------------------- 13 files changed, 229 insertions(+), 166 deletions(-) create mode 100644 example/TypeScript.vue create mode 100644 example/tsconfig.json create mode 100644 src/util.ts diff --git a/example/App.vue b/example/App.vue index d4db4374f..1d4ab3add 100644 --- a/example/App.vue +++ b/example/App.vue @@ -5,12 +5,14 @@ {{ count }} + diff --git a/example/ScriptSetup.vue b/example/ScriptSetup.vue index 3cc768ba6..d71bc2433 100644 --- a/example/ScriptSetup.vue +++ b/example/ScriptSetup.vue @@ -1,17 +1,8 @@ - - + +