aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/webpack.production.js
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/webpack.production.js')
-rw-r--r--openecomp-ui/webpack.production.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/openecomp-ui/webpack.production.js b/openecomp-ui/webpack.production.js
new file mode 100644
index 0000000000..1bb9420d33
--- /dev/null
+++ b/openecomp-ui/webpack.production.js
@@ -0,0 +1,45 @@
+'use strict';
+
+let path = require('path');
+let webpack = require('webpack');
+
+let webpackCommon = require('./webpack.common');
+
+let webpackDevConfig = Object.assign({}, webpackCommon, {
+ devtool: undefined,
+ cache: true,
+ output: {
+ path: path.join(__dirname, 'dist'),
+ publicPath: '/onboarding/',
+ filename: '[name].js'
+ },
+ resolveLoader: {
+ modules: [path.join(__dirname, 'node_modules'), path.resolve('.')],
+ alias: {
+ 'config-json-loader': 'tools/webpack/config-json-loader/index.js'
+ }
+ },
+ plugins: [
+ new webpack.DefinePlugin({
+ 'process.env': {
+ // This has effect on the react lib size
+ 'NODE_ENV': JSON.stringify('production')
+ },
+ DEBUG: false,
+ DEV: false
+ }),
+ new webpack.optimize.UglifyJsPlugin(),
+ new webpack.LoaderOptionsPlugin({
+ options: {
+ eslint: {
+ configFile: './.eslintrc',
+ emitError: true,
+ emitWarning: true,
+ failOnError: true
+ }
+ }
+ })
+ ]
+});
+
+module.exports = webpackDevConfig;