summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/webpack.production.js
diff options
context:
space:
mode:
authorAviZi <avi.ziv@amdocs.com>2017-06-09 02:39:56 +0300
committerAviZi <avi.ziv@amdocs.com>2017-06-09 02:39:56 +0300
commit280f8015d06af1f41a3ef12e8300801c7a5e0d54 (patch)
tree9c1d3978c04cd28068f02073038c936bb49ca9e0 /openecomp-ui/webpack.production.js
parentfd3821dad11780d33c5373d74c957c442489945e (diff)
[SDC-29] Amdocs OnBoard 1707 initial commit.
Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370 Signed-off-by: AviZi <avi.ziv@amdocs.com>
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;