Skip to content

Commit 4ce4686

Browse files
authored
Merge pull request #310 from nogic1008/hotfix/template-compiler
fix: add fallback to default TemplateCompileOptions
2 parents a5bddc1 + ea5fbe1 commit 4ce4686

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,28 @@ If a string is provided, it will be an assumed path to a TypeScript configuratio
271271
}
272272
```
273273

274+
#### templateCompiler
275+
276+
You can provide [TemplateCompileOptions](https://github.com/vuejs/component-compiler-utils#compiletemplatetemplatecompileoptions-templatecompileresults) in `templateCompiler` section like this:
277+
278+
```json
279+
{
280+
"jest": {
281+
"globals": {
282+
"vue-jest": {
283+
"templateCompiler": {
284+
"transpileOptions": {
285+
"transforms": {
286+
"dangerousTaggedTemplateString": true
287+
}
288+
}
289+
}
290+
}
291+
}
292+
}
293+
}
294+
```
295+
274296
### Supported template languages
275297

276298
- **pug** (`lang="pug"`)

lib/process.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ function processTemplate(template, filename, config) {
6969
compilerOptions: {
7070
optimize: false,
7171
...userTemplateCompilerOptions.compilerOptions
72-
},
73-
transformAssetUrls: { ...userTemplateCompilerOptions.transformAssetUrls },
74-
transpileOptions: { ...userTemplateCompilerOptions.transpileOptions }
72+
}
7573
})
7674

7775
logResultErrors(result)

0 commit comments

Comments
 (0)