Ensure prod builds don't use inline source maps
The bundle grew by a factor of 4, so let's only do that while we're developing.
This commit is contained in:
committed by
Soren L. Hansen
parent
41f09daf42
commit
e0ee2822cd
@@ -2,6 +2,14 @@ const path = require('path');
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const LicenseWebpackPlugin = require('license-webpack-plugin').LicenseWebpackPlugin;
|
||||
|
||||
var devtool;
|
||||
|
||||
if (process.env.DEV === '1') {
|
||||
devtool = 'inline-source-map';
|
||||
} else {
|
||||
devtool = 'source-map';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
entry: "./src/main.ts",
|
||||
entry: {
|
||||
@@ -10,7 +18,7 @@ module.exports = {
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../bindata/static/js/'),
|
||||
},
|
||||
devtool: "inline-source-map",
|
||||
devtool: devtool,
|
||||
resolve: {
|
||||
extensions: [".ts", ".tsx", ".js"],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user