X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=sdnr%2Fwt%2Fodlux%2Fapps%2FconfigurationApp%2Fwebpack.config.js;h=2f7ab11b43227b1a033a36e9ec8166bd9c538be1;hb=fad3167f42d585e3144547db4c6dd7d00ea7b18a;hp=5461c14f29005aa30d08ba7d89440ac482257542;hpb=1a868116614dd9996c78e69941b537e9da19460b;p=ccsdk%2Ffeatures.git diff --git a/sdnr/wt/odlux/apps/configurationApp/webpack.config.js b/sdnr/wt/odlux/apps/configurationApp/webpack.config.js index 5461c14f2..2f7ab11b4 100644 --- a/sdnr/wt/odlux/apps/configurationApp/webpack.config.js +++ b/sdnr/wt/odlux/apps/configurationApp/webpack.config.js @@ -10,6 +10,7 @@ const path = require("path"); const webpack = require("webpack"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const TerserPlugin = require('terser-webpack-plugin'); +const proxyConf = require('../../proxy.conf'); const policies = require('./policies.json'); @@ -40,7 +41,7 @@ module.exports = (env) => { output: { path: distPath, filename: "[name].js", - library: "[name]", + library: "configurationApp", libraryTarget: "umd2", chunkFilename: "[name].js" }, @@ -59,6 +60,16 @@ module.exports = (env) => { use: [{ loader: "babel-loader" }] + },{ + //don't minify images + test: /\.(png|gif|jpg|svg)$/, + use: [{ + loader: 'url-loader', + options: { + limit: 10, + name: './images/[name].[ext]' + } + }] }] }, @@ -133,56 +144,7 @@ module.exports = (env) => { before: function(app, server, compiler) { app.get('/oauth/policies',(_, res) => res.json(policies)); }, - proxy: { - "/about": { - target: "http://localhost:18181", - secure: false - }, - "/yang-schema/": { - target: "http://localhost:18181", - secure: false - }, - "/oauth/": { - target: "http://localhost:18181", - secure: false - }, - "/database/": { - target: "http://localhost:18181", - secure: false - }, - "/restconf/": { - target: "http://localhost:18181", - secure: false - }, - "/rests/": { - target: "http://localhost:18181", - secure: false - }, - "/help/": { - target: "http://localhost:18181", - secure: false - }, - "/about/": { - target: "http://localhost:18181", - secure: false - }, - "/tree/": { - target: "http://localhost:18181", - secure: false - }, - "/websocket": { - target: "http://localhost:18181", - ws: true, - changeOrigin: true, - secure: false - }, - "/apidoc": { - target: "http://localhost:18181", - ws: true, - changeOrigin: true, - secure: false - } - } + proxy: proxyConf, } }]; }