Skip to content

Commit

Permalink
update webpack config file
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoschenkel committed May 22, 2021
1 parent 300f54d commit cc073ee
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const webpack = require("webpack");
const path = require("path");
const TerserPlugin = require("terser-webpack-plugin");

module.exports = env => {
module.exports = (env) => {
if (!env) env = { production: false, karma: false };

let mode = env.production ? "production" : "development";
Expand Down Expand Up @@ -31,14 +31,11 @@ module.exports = env => {
rules: [
{
test: /\.ts$/,
loader: "ts-loader?configFile=" + tsconfig
use: [{ loader: "ts-loader", options: { configFile: tsconfig } }]
},
{
test: env.production /* disable this loader for production builds */ ? /^$/ : /^.*(src).*\.ts$/,
loader: "istanbul-instrumenter-loader",
query: {
embedSource: true
},
enforce: "post"
}
]
Expand All @@ -52,10 +49,10 @@ module.exports = env => {
minimize: true,
minimizer: [
new TerserPlugin({
cache: true,
parallel: 4,
extractComments: false,
terserOptions: {
output: {
format: {
comments: false
}
}
Expand Down

0 comments on commit cc073ee

Please sign in to comment.