From 0ada4d6a8ce3d6687fb33e03e88e91167b6a497d Mon Sep 17 00:00:00 2001 From: miewx Date: Thu, 31 Jan 2019 00:19:40 +0800 Subject: [PATCH] pug Deprecated pretty (#2582) 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,