From 1b029f9412b280c83ba1b2cedb12a05e5c80537c Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Mon, 28 May 2018 13:53:33 +0100 Subject: [PATCH] fix: Explicitly set the prettier parser to 'babylon' Since as of Prettier 1.13.0 there is no longer a default: prettier/prettier#4528 The `parser` option has been supported since prettier v0.0.10, so this won't break users whose lockfile still references a pre-1.13.0 release of prettier: https://github.com/prettier/prettier/blob/1.13.0/src/main/core-options.js#L89 This is the `13.x` branch backport of: vuejs/component-compiler-utils#15 --- lib/template-compiler/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/template-compiler/index.js b/lib/template-compiler/index.js index 95d8ff00b..8fbb13880 100644 --- a/lib/template-compiler/index.js +++ b/lib/template-compiler/index.js @@ -77,7 +77,7 @@ module.exports = function (html) { // prettify render fn if (!isProduction) { - code = prettier.format(code, { semi: false }) + code = prettier.format(code, { semi: false, parser: 'babylon' }) } // mark with stripped (this enables Vue to use correct runtime proxy detection)