From f76113ee31992221374d85d6afbdbf2fc0119849 Mon Sep 17 00:00:00 2001 From: FrediL <1583084+FrediL@users.noreply.github.com> Date: Fri, 4 May 2018 14:57:01 +0200 Subject: [PATCH] Use synchronous version of writeFile in extract-css We are never waiting for async writeFile to complete. This can sometimes result in empty file. --- plugins/extract-css.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/extract-css.js b/plugins/extract-css.js index e3331e9..ac81908 100644 --- a/plugins/extract-css.js +++ b/plugins/extract-css.js @@ -18,7 +18,7 @@ module.exports = function (b, opts) { outPath.write(css) outPath.end() } else if (typeof outPath === 'string') { - fs.writeFile(outPath, css, function () {}) + fs.writeFileSync(outPath, css) } }) })