From a814b6463c8389760951c0e0416d811fb1cac412 Mon Sep 17 00:00:00 2001 From: Tim Suchanek Date: Fri, 31 Mar 2017 16:57:45 +0200 Subject: [PATCH] remove postcss comments When using plugins like postcss-next, postcss-inherit it occurs to me, that the sourcemap is added, even in production builds. This removes the comments completely. It reduced our build size from 9.8M to 5.2M --- src/processor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/processor.js b/src/processor.js index 491fa17..c8daf8b 100644 --- a/src/processor.js +++ b/src/processor.js @@ -12,6 +12,11 @@ export default async (src, options = {}) => { if (!processor) { processor = postcss(plugins) } - const result = await processor.process(src) + const result = await processor.process(src, { + map: { + inline: false, + annotation: false + } + }) return result.css }