diff options
| author | 2021-01-21 00:14:18 +0300 | |
|---|---|---|
| committer | 2021-01-21 00:14:18 +0300 | |
| commit | 7b1f6e8875c05558b1dc014dcbabd27f534455d3 (patch) | |
| tree | c0d6bd874262b7e4cd70edebd85080ac61fd4fac /webpack.config.js | |
| parent | Corrects SHA & Path In Workflow (diff) | |
Compiles Source Maps
Adds source map compilation for builds. Additionally, simplifies the
file naming, and url.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to '')
| -rw-r--r-- | webpack.config.js | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/webpack.config.js b/webpack.config.js index 93e7e9d..e24c8f1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,13 +6,15 @@ if (process.env.NODE_ENV === "development") { require("dotenv").config(); }  module.exports = {      entry: "./src/index.tsx", -    mode: process.env.NODE_ENV, +    mode: process.env.NODE_ENV || "production",      output: {          path: path.resolve(__dirname, "build"), -        filename: "[name].[contenthash].bundle.js", +        filename: "[name].bundle.js", +        sourceMapFilename: "[name].bundle.js.map",          publicPath: "/", -        devtoolModuleFilenameTemplate: "file:///" + path.resolve(__dirname, "[resource-path]?[loaders]") +        devtoolModuleFilenameTemplate: "[resource-path]"      }, +    devtool: "source-map",      optimization: {          splitChunks: {              chunks: 'all', | 
