From 727bf1a3d4e00942b294ddafa8b40aae22ed2fb9 Mon Sep 17 00:00:00 2001 From: miewx Date: Sun, 27 Jan 2019 19:26:55 +0800 Subject: [PATCH] pug Deprecated pretty see https://pugjs.org/api/reference.html#options pretty: boolean | string [Deprecated.] Adds whitespace to the resulting HTML to make it easier for a human to read using ' ' as indentation. If a string is specified, that will be used as indentation instead (e.g. '\t'). We strongly recommend against using this option. Too often, it creates subtle bugs in your templates because of the way it alters the interpretation and rendering of whitespace, and so this feature is going to be removed. Defaults to false. --- packages/core/parcel-bundler/src/assets/PugAsset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/parcel-bundler/src/assets/PugAsset.js b/packages/core/parcel-bundler/src/assets/PugAsset.js index 069b62a9ddd..b9a431b2bf3 100644 --- a/packages/core/parcel-bundler/src/assets/PugAsset.js +++ b/packages/core/parcel-bundler/src/assets/PugAsset.js @@ -18,7 +18,7 @@ class PugAsset extends Asset { compileDebug: false, filename: this.name, basedir: path.dirname(this.name), - pretty: !this.options.minify, + pretty: config.pretty || false, templateName: path.basename(this.basename, path.extname(this.basename)), filters: config.filters, filterOptions: config.filterOptions,