Skip to content

Commit

Permalink
Merge pull request #310 from nogic1008/hotfix/template-compiler
Browse files Browse the repository at this point in the history
fix: add fallback to default TemplateCompileOptions
  • Loading branch information
lmiller1990 authored Dec 11, 2020
2 parents a5bddc1 + ea5fbe1 commit 4ce4686
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`)
Expand Down
4 changes: 1 addition & 3 deletions lib/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ function processTemplate(template, filename, config) {
compilerOptions: {
optimize: false,
...userTemplateCompilerOptions.compilerOptions
},
transformAssetUrls: { ...userTemplateCompilerOptions.transformAssetUrls },
transpileOptions: { ...userTemplateCompilerOptions.transpileOptions }
}
})

logResultErrors(result)
Expand Down

0 comments on commit 4ce4686

Please sign in to comment.