From aeaf3d95e34e6d10a71283c1efeb68b6ed2d8c05 Mon Sep 17 00:00:00 2001 From: tomazy Date: Sat, 23 Dec 2017 19:24:49 +0100 Subject: [PATCH] Remove render-page.js.map from public folder This file is not required in production and it may leak too much information about the folder structure and/or user name --- packages/gatsby/src/commands/build-html.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gatsby/src/commands/build-html.js b/packages/gatsby/src/commands/build-html.js index 2ebd8d3bd3b14..aba29d71de0ae 100644 --- a/packages/gatsby/src/commands/build-html.js +++ b/packages/gatsby/src/commands/build-html.js @@ -44,6 +44,7 @@ module.exports = async (program: any) => { // Remove the temp JS bundle file built for the static-site-generator-plugin try { fs.unlinkSync(outputFile) + fs.unlinkSync(`${outputFile}.map`) } catch (e) { // This function will fail on Windows with no further consequences. }