From 0f9362c6cac013bcd4db62c260690b5a2ff0379e Mon Sep 17 00:00:00 2001 From: RemixDev Date: Wed, 9 Mar 2022 11:21:46 +0100 Subject: [PATCH] Fixed sourcemap generation script --- server/package.json | 1 + server/webpack.config.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/package.json b/server/package.json index 2432751..e087778 100644 --- a/server/package.json +++ b/server/package.json @@ -5,6 +5,7 @@ "scripts": { "start": "node dist/app.js", "build": "webpack --env production", + "sourcemap": "webpack --env production sourcemap", "prewatch": "yarn lint-build", "watch": "webpack --watch", "lint": "eslint \"./{src, tests}/**\" --fix", diff --git a/server/webpack.config.js b/server/webpack.config.js index a25d782..de8129a 100644 --- a/server/webpack.config.js +++ b/server/webpack.config.js @@ -5,9 +5,9 @@ const NodemonPlugin = require('nodemon-webpack-plugin') module.exports = env => { const isProduction = !!env.production const generateSourceMap = !!env.sourcemap - let devtool = false - if (!isProduction) { - devtool = generateSourceMap ? 'source-map' : 'eval' + let devtool = 'eval' + if (isProduction) { + devtool = generateSourceMap ? 'source-map' : false } const config = { mode: isProduction ? 'production' : 'development',