summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/webpack.production.js
diff options
context:
space:
mode:
authorEinav Weiss Keidar <einavw@amdocs.com>2018-05-30 18:12:02 +0300
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-07-08 08:58:48 +0000
commitf2c47232959536b878b1db64a8a5ffb63a1d7f1f (patch)
treedb73f6396a089bbc74ee7372180a01286bf3b3a0 /openecomp-ui/webpack.production.js
parentd4cc2beaef58a4fc95bdc281efd879b1d1edf279 (diff)
webpack 4 upgrade
Issue-ID: SDC-1388 Change-Id: I44d61491ef802187baa4beb3b4fc2c9f1e8405e5 Signed-off-by: Einav Weiss Keidar <einavw@amdocs.com>
Diffstat (limited to 'openecomp-ui/webpack.production.js')
-rw-r--r--openecomp-ui/webpack.production.js66
1 files changed, 0 insertions, 66 deletions
diff --git a/openecomp-ui/webpack.production.js b/openecomp-ui/webpack.production.js
deleted file mode 100644
index 22da77e6ed..0000000000
--- a/openecomp-ui/webpack.production.js
+++ /dev/null
@@ -1,66 +0,0 @@
-'use strict';
-
-let path = require('path');
-let webpack = require('webpack');
-
-let cloneDeep = require('lodash/cloneDeep');
-let assign = require('lodash/assign');
-let webpackCommon = require('./webpack.common');
-
-// copying the common config
-let webpackProdConfig = cloneDeep(webpackCommon);
-// setting production settings
-assign(webpackProdConfig, {
- 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
- }
- }
- })
- ]
-});
-
-webpackProdConfig.module.rules = webpackProdConfig.module.rules.filter(
- rule =>
- rule.enforce !== 'pre' ||
- (rule.enforce === 'pre' && rule.loader !== 'source-map-loader')
-);
-webpackProdConfig.module.rules.forEach(loader => {
- if (loader.use && loader.use[0].loader === 'style-loader') {
- loader.use = loader.use.map(loaderObj =>
- loaderObj.loader.replace('?sourceMap', '')
- );
- }
-});
-webpackProdConfig.module.rules.push({
- test: /config.json$/,
- use: [{ loader: 'config-json-loader' }]
-});
-module.exports = webpackProdConfig;