Moved config to ngConstant to mount that from outside the container
Change-Id: I23169cdeeae9034ea97e94089dcdbca3179bbb23
diff --git a/conf/webpack-dist.conf.js b/conf/webpack-dist.conf.js
index 21f8ce3..85ec542 100644
--- a/conf/webpack-dist.conf.js
+++ b/conf/webpack-dist.conf.js
@@ -7,6 +7,9 @@
const pkg = require('../package.json');
const autoprefixer = require('autoprefixer');
const BaseHrefWebpackPlugin = require('base-href-webpack-plugin').BaseHrefWebpackPlugin;
+const CopyWebpackPlugin = require('copy-webpack-plugin');
+const env = process.env.NODE_ENV || 'production';
+const brand = process.env.BRAND || 'cord';
module.exports = {
module: {
@@ -47,9 +50,14 @@
]
},
plugins: [
+ new CopyWebpackPlugin([
+ { from: `./conf/app/app.config.${env}.js`, to: `app.config.js` },
+ { from: `./conf/app/style.config.${brand}.js`, to: `style.config.js` },
+ ]),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.NoErrorsPlugin(),
new HtmlWebpackPlugin({
+ inject: true,
template: conf.path.src('index.html')
}),
new webpack.optimize.UglifyJsPlugin({
@@ -64,7 +72,7 @@
}),
new BaseHrefWebpackPlugin({
baseHref: '/spa/'
- })
+ }),
],
postcss: () => [autoprefixer],
output: {