X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=openecomp-ui%2Fwebpack.config.js;h=be2e75efdb1323a3e376d36cc8124ffbaf3cb365;hb=refs%2Fheads%2Fjakarta;hp=2e8731e27107fa58e8698963c807d51379f7bead;hpb=804ec686128a49628e9f656397e4a4512e4c5714;p=sdc.git diff --git a/openecomp-ui/webpack.config.js b/openecomp-ui/webpack.config.js index 2e8731e271..be2e75efdb 100644 --- a/openecomp-ui/webpack.config.js +++ b/openecomp-ui/webpack.config.js @@ -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' }) ] };