Skip to content

Commit

Permalink
feat: add compiler option (#58)
Browse files Browse the repository at this point in the history
* feat: add an option to configure the compiler used

* doc: update readme for compiler option
  • Loading branch information
Tronix117 authored Mar 19, 2020
1 parent 26328aa commit fa51333
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ If `false`, disable hot module replacement.

You can enable SSR optimazation when specify this option `true`.

### compiler

- type: `function`
- default: `vue-template-compiler`

You can override the default compiler using this option.

## Templates

There is vue-cli template using vue-template-loader (Thanks to @Toilal).
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/template-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function compile (template, options = {}) {
const compiled = compileTemplate({
source: template,
filename: options.filename,
compiler,
compiler: options.compiler || compiler,
transformAssetUrls: options.transformAssetUrls,
isFunctional: options.functional,
isProduction: options.isProduction,
Expand Down

0 comments on commit fa51333

Please sign in to comment.