Files
ohif-viewer/extensions/cornerstone/.webpack/webpack.prod.js
T

43 lines
1.0 KiB
JavaScript
Raw Normal View History

const webpack = require('webpack');
const merge = require('webpack-merge');
2019-08-13 15:36:46 -04:00
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
2019-08-13 15:36:46 -04:00
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
stats: {
colors: true,
hash: true,
timings: true,
assets: true,
chunks: false,
chunkModules: false,
modules: false,
children: false,
warnings: true,
},
optimization: {
minimize: true,
sideEffects: true,
},
output: {
path: ROOT_DIR,
2019-09-10 16:02:08 -04:00
library: 'OHIFExtCornerstone',
2019-08-13 15:36:46 -04:00
libraryTarget: 'umd',
2019-09-10 16:02:08 -04:00
libraryExport: 'default',
2019-08-13 15:36:46 -04:00
filename: pkg.main,
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
],
2019-08-13 15:36:46 -04:00
});
};