mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
61 lines
1.5 KiB
JavaScript
61 lines
1.5 KiB
JavaScript
const webpackMerge = require('webpack-merge');
|
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
|
const commonConfig = require('./webpack.common.js');
|
|
const fs = require('fs');
|
|
const webpack = require('webpack');
|
|
const path = require('path');
|
|
|
|
module.exports = webpackMerge(commonConfig, {
|
|
|
|
// require those dependencies but don't bundle them
|
|
externals: [
|
|
/^\@angular\//,
|
|
/^rxjs\//,
|
|
/^\@ngx-translate\//,
|
|
'moment',
|
|
'minimatch',
|
|
'raphael',
|
|
'ng2-charts',
|
|
'alfresco-js-api',
|
|
/^\@alfresco\//,
|
|
'content-services',
|
|
'process-services',
|
|
'core'
|
|
],
|
|
|
|
output: {
|
|
filename: '[name]/bundles/adf-[name].js',
|
|
library: '[name]',
|
|
libraryTarget: 'umd',
|
|
chunkFilename: '[id].chunk.js'
|
|
},
|
|
|
|
entry: {
|
|
"core": "./core/index.ts",
|
|
"insights": "./insights/index.ts",
|
|
"content-services": "./content-services/index.ts",
|
|
"process-services": "./process-services/index.ts"
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new UglifyJSPlugin({
|
|
sourceMap: true,
|
|
uglifyOptions: {
|
|
ie8: false,
|
|
ecma: 6,
|
|
output: {
|
|
comments: false,
|
|
beautify: false
|
|
},
|
|
warnings: false
|
|
}
|
|
}),
|
|
|
|
new webpack.BannerPlugin({
|
|
banner: fs.readFileSync(path.resolve(__dirname, './assets/license_header_add.txt'), 'utf8'),
|
|
entryOnly: true
|
|
})
|
|
]
|
|
});
|