From 229cbf92016ff9e58940c424268d0c55c40295e5 Mon Sep 17 00:00:00 2001 From: Nogic <24802730+nogic1008@users.noreply.github.com> Date: Thu, 10 Dec 2020 17:12:07 +0900 Subject: [PATCH 1/2] fix: fallback to default templateCompilerOptions --- lib/process.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/process.js b/lib/process.js index 1a462dc5..4e14b22b 100644 --- a/lib/process.js +++ b/lib/process.js @@ -69,9 +69,7 @@ function processTemplate(template, filename, config) { compilerOptions: { optimize: false, ...userTemplateCompilerOptions.compilerOptions - }, - transformAssetUrls: { ...userTemplateCompilerOptions.transformAssetUrls }, - transpileOptions: { ...userTemplateCompilerOptions.transpileOptions } + } }) logResultErrors(result) From ea5fbe119f9f461e005f56c66733ed07a30bf92a Mon Sep 17 00:00:00 2001 From: Nogic <24802730+nogic1008@users.noreply.github.com> Date: Thu, 10 Dec 2020 17:24:16 +0900 Subject: [PATCH 2/2] docs: add templateCompiler section in README --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 335af94c..34109c7a 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,28 @@ If a string is provided, it will be an assumed path to a TypeScript configuratio } ``` +#### templateCompiler + +You can provide [TemplateCompileOptions](https://github.com/vuejs/component-compiler-utils#compiletemplatetemplatecompileoptions-templatecompileresults) in `templateCompiler` section like this: + +```json +{ + "jest": { + "globals": { + "vue-jest": { + "templateCompiler": { + "transpileOptions": { + "transforms": { + "dangerousTaggedTemplateString": true + } + } + } + } + } + } +} +``` + ### Supported template languages - **pug** (`lang="pug"`)