mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
60
lib/config/webpack.build.js
Normal file
60
lib/config/webpack.build.js
Normal file
@@ -0,0 +1,60 @@
|
||||
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/[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
|
||||
})
|
||||
]
|
||||
});
|
Reference in New Issue
Block a user