Fix use of encrypted user in backend
[sdc.git] / openecomp-ui / webpack.config.js
index 2e8731e..be2e75e 100644 (file)
@@ -3,7 +3,7 @@
 const path = require('path');
 const CleanWebpackPlugin = require('clean-webpack-plugin');
 const { DefinePlugin, HotModuleReplacementPlugin } = require('webpack');
-
+const HtmlWebpackPlugin = require('html-webpack-plugin');
 const devConfig = require('./tools/getDevConfig');
 const proxyServer = require('./proxy-server');
 const fs = require('fs');
@@ -46,7 +46,7 @@ module.exports = (env, argv) => {
         },
         output: {
             path: path.join(__dirname, 'dist'),
-            publicPath: DEV ? publicPath : '/onboarding/',
+            publicPath: DEV ? publicPath : './',
             filename: DEV ? '[name].js' : '[name]_' + language + '.js'
         },
         module: {
@@ -86,13 +86,10 @@ module.exports = (env, argv) => {
                     ],
                     include: [
                         /resources/,
-                        path.join(
-                            __dirname,
-                            'node_modules/dox-sequence-diagram-ui/'
-                        ),
+                        path.join(__dirname, DEV ? '../dox-sequence-diagram-ui/' : 'node_modules/dox-sequence-diagram-ui/'),
                         path.join(__dirname, 'node_modules/react-datepicker/'),
                         path.join(__dirname, 'node_modules/react-select/'),
-                        path.join(__dirname, 'node_modules/sdc-ui/'),
+                        path.join(__dirname, 'node_modules/onap-ui-common/'),
                         path.join(__dirname, 'node_modules/react-checkbox-tree/')
                     ]
                 },
@@ -108,7 +105,7 @@ module.exports = (env, argv) => {
                             __dirname,
                             'node_modules/dox-sequence-diagram-ui/'
                         ),
-                        path.join(__dirname, 'node_modules/sdc-ui/')
+                        path.join(__dirname, 'node_modules/onap-ui-common/')
                     ]
                 },
                 {
@@ -130,6 +127,10 @@ module.exports = (env, argv) => {
                   new DefinePlugin({
                       DEBUG: DEV === true,
                       DEV: DEV === true
+                  }),
+                  new HtmlWebpackPlugin({
+                    filename: 'index.html',
+                    template: __dirname + '/src/index.html'
                   })
               ]
     };