From 404cc47f5f31c8a7c999d25314d952b8b12b5ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sat, 5 Aug 2017 23:15:47 -0700 Subject: [PATCH] Enable source map generation in webpack JS files are minified, enabling source map generation will help with debugging. Sentry can also use source maps for better exceptions. --- webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index f8da75ed0..fc1fa5b38 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,7 @@ const CleanWebpackPlugin = require("clean-webpack-plugin"); var config = { cache: true, context: path.resolve(__dirname, "assets/static"), + devtool: "cheap-source-map", entry: { unsee: "./unsee.js", help: "./help.js" @@ -37,7 +38,7 @@ var config = { fs.mkdirSync(path.join(__dirname, "assets/static/dist/templates")); for (var chunkName in stats.assetsByChunkName) { var loaderName = "loader_" + chunkName + ".html"; - var loaderScript = ""; + var loaderScript = ""; fs.writeFileSync(path.join(__dirname, "assets/static/dist/templates", loaderName), loaderScript); } }