Try these flags
ng build --aot --prod --bo -sm --vendor-chunk=false --output-hashing=none
I found that here
There is also an easy to use webpack combiner plugin that you should check out, example:
var webpack = require('webpack');
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var MergeFilesPlugin = require('merge-files-webpack-plugin');
module.exports = {
entry: {
'entry1': './tests/test1/src/entry1/index.js',
'entry2': './tests/test1/src/entry2/index.js'
},
output: {
path: path.join(__dirname, './tests/test1/public'),
filename: 'all-bundled.js'
},
module: {
rules: [
{
use: ExtractTextPlugin.extract({
use: 'css-loader'
}),
test: /\.css$/,
exclude: /node_modules/
}
]
},
plugins: [
new ExtractTextPlugin({
filename: '[name].style.css'
}),
new MergeFilesPlugin({
filename: 'css/style.css',
test: /style\.css/, // it could also be a string
deleteSourceFiles: true
})
]
}
But that would be another npm module which you seem to be against. It is not clear exactly what you are asking as you didn't give examples of what you had tried, or the build commands you ran.
There's also something called multicompiler you should check out.
[
{
entry: './app.js',
output: {
filename: 'app.js'
}
},
{
entry: ['es5-shim', 'es5-shim/es5-sham', 'es6-shim', './vendor/polyfills.js'],
output: output: {
filename: 'concated.js'
}
}
]
entry: { app: ['src/app.ts', 'src/vendor.ts'] }, output: { filename: 'everything.js' }