mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
readme modify start.sh and nom-build-all refactoring change travis conf update version of zone.js (fixes console error) karma conf remove dist add alias build override tsconfig components build
65 lines
1.7 KiB
JavaScript
65 lines
1.7 KiB
JavaScript
const webpack = require('webpack');
|
|
const webpackMerge = require('webpack-merge');
|
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
const commonConfig = require('./webpack.common.js');
|
|
const helpers = require('./helpers');
|
|
|
|
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
|
|
|
|
module.exports = webpackMerge(commonConfig, {
|
|
|
|
devtool: 'source-map',
|
|
|
|
output: {
|
|
path: helpers.root('dist'),
|
|
publicPath: '/',
|
|
filename: '[name].[hash].js',
|
|
chunkFilename: '[id].[hash].chunk.js'
|
|
},
|
|
|
|
resolve: {
|
|
extensions: ['.ts', '.js'],
|
|
modules: [helpers.root('node_modules')]
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
loader: [
|
|
'ts-loader',
|
|
'angular2-template-loader'
|
|
],
|
|
exclude: [ /node_modules/, /public/, /resources/, /dist/]
|
|
}
|
|
]
|
|
},
|
|
|
|
plugins: [
|
|
new webpack.NoEmitOnErrorsPlugin(),
|
|
new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618
|
|
mangle: {
|
|
keep_fnames: true
|
|
},
|
|
compress: {
|
|
warnings: false
|
|
},
|
|
output: {
|
|
comments: false
|
|
},
|
|
sourceMap: true
|
|
}),
|
|
new ExtractTextPlugin('[name].[hash].css'),
|
|
new webpack.DefinePlugin({
|
|
'process.env': {
|
|
'ENV': JSON.stringify(ENV)
|
|
}
|
|
}),
|
|
new webpack.LoaderOptionsPlugin({
|
|
htmlLoader: {
|
|
minimize: false // workaround for ng2
|
|
}
|
|
})
|
|
]
|
|
});
|