From f8498ce70c78665f456998436b47df8d28c868eb Mon Sep 17 00:00:00 2001 From: Piotr Miazga Date: Tue, 29 Aug 2017 21:18:35 +0200 Subject: [PATCH] Store map files under .json extension We cannot serve .map files from production servers. This makes Popups extension difficult to debug. As a simplest solution we decided to store map files as .json files so we can easily access js maps files. Changes: - changed webpack config to store map files under .json extension Bug: T173491 Change-Id: Iaa55f75a8c5f3e8f1f169b3ac33241cc54f0413f --- resources/dist/index.js | Bin 36196 -> 36197 bytes .../dist/{index.js.map => index.js.json} | Bin webpack.config.js | 5 ++++- 3 files changed, 4 insertions(+), 1 deletion(-) rename resources/dist/{index.js.map => index.js.json} (100%) diff --git a/resources/dist/index.js b/resources/dist/index.js index 802457984585273a65de63f483bf28acf0ad4e9e..319a410e954106084486b2cccf36a8b6358988bf 100644 GIT binary patch delta 14 VcmaDdi|OesrVWX`ELp|*c>pvs23`OF delta 13 UcmaDli|NTMrVWX`%(;mL04=%&;Q#;t diff --git a/resources/dist/index.js.map b/resources/dist/index.js.json similarity index 100% rename from resources/dist/index.js.map rename to resources/dist/index.js.json diff --git a/webpack.config.js b/webpack.config.js index ae1d7b093..27788b916 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -24,7 +24,10 @@ conf = { // Write each chunk (entries, here) to a file named after the entry, e.g. // the "index" entry gets written to index.js. - filename: '[name].js' + filename: '[name].js', + // as we cannot serve .map files from production servers store map files + // with .json extension + sourceMapFilename: "[file].json" }, entry: { index: './src/index.js'