Skip to content

Commit

Permalink
TODO: review this
Browse files Browse the repository at this point in the history
  • Loading branch information
yagni committed Feb 17, 2023
1 parent 0338748 commit 462ddbd
Show file tree
Hide file tree
Showing 5 changed files with 1,403 additions and 8,777 deletions.
7 changes: 2 additions & 5 deletions config/karma/karma-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ delete webpackConfig.output.library;
webpackConfig.module.rules.push({
test: /\.js$/,
include: path.resolve('./src/'),
loader: 'istanbul-instrumenter-loader',
query: {
esModules: true
}
use: '@jsdevtools/coverage-istanbul-loader'
});

module.exports = {
Expand Down Expand Up @@ -50,7 +47,7 @@ module.exports = {
}
},

coverageReporter: {
coverageIstanbulReporter: {
dir: './coverage',
reporters: [
{type: 'html', subdir: 'html'},
Expand Down
6 changes: 2 additions & 4 deletions config/webpack/webpack-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ module.exports = {
externals: {
'zlib': 'zlib'
},
node: false,
target: 'web',
target: ['web', 'es5'],
output: {
filename: '[name].js',
library: {
commonjs: "dicom-parser",
amd: "dicom-parser",
Expand All @@ -33,7 +31,7 @@ module.exports = {
enforce: 'pre',
test: /\.js$/,
exclude: /(node_modules|test)/,
loader: 'eslint-loader',
use: [{loader: 'eslint-loader'}],
options: {
failOnError: false
}
Expand Down
7 changes: 3 additions & 4 deletions config/webpack/webpack-prod.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
const merge = require('./merge');
const baseConfig = require('./webpack-base');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

const devConfig = {
output: {
filename: '[name].min.js'
},
mode: "production",
optimization: {
minimize: true,
minimizer: [
new UglifyJSPlugin({
sourceMap: true
})
new TerserPlugin()
]
},
};
Expand Down
Loading

0 comments on commit 462ddbd

Please sign in to comment.