Create wt-odlux directory
[ccsdk/features.git] / sdnr / wt / odlux / apps / inventoryApp / webpack.config.js
index 889bb4d..6a78056 100644 (file)
@@ -57,6 +57,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]'
+          }
+        }]
       }]
     },
 
@@ -86,7 +96,7 @@ module.exports = (env) => {
         manifest: require(path.resolve(frameworkPath, "app-manifest.json")),
         sourceType: "umd2"
       }),
-      ...(env === "release") ? [
+      ...(env === "release" ? [
         new webpack.DefinePlugin({
           "process.env": {
             NODE_ENV: "'production'",
@@ -104,7 +114,7 @@ module.exports = (env) => {
             from: 'index.html',
             to: distPath
           }]),
-        ]
+        ])
     ],
 
     devServer: {
@@ -127,29 +137,39 @@ module.exports = (env) => {
       },
       proxy: {
         "/oauth2/": {
-          target: "http://localhost:48181",
-          secure: false
-        },
-        "/yang-schema/": {
-          target: "http://localhost:48181",
+          target: "http://sdnc-web:8080",
           secure: false
         },
         "/database/": {
-          target: "http://localhost:48181",
+          target: "http://sdnc-web:8080",
           secure: false
         },
         "/restconf/": {
-          target: "http://localhost:48181",
+          target: "http://sdnc-web:8080",
+          secure: false
+        },
+        "/rests/": {
+          target: "http://sdnc-web:8080",
           secure: false
         },
         "/help/": {
-          target: "http://localhost:48181",
+          target: "http://sdnc-web:8080",
+          secure: false
+        },
+        "/tree/": {
+          target: "http://sdnc-web:8080",
           secure: false
         },
         "/websocket": {
-          target: "http://localhost:48181",
+          target: "http://sdnc-web:8080",
+          ws: true,
+          changeOrigin: true,
+          secure: false
+        },
+        "/yang-schema": {
+          target: "http://sdnc-web:8080",
           ws: true,
-          changeOrigin: false,
+          changeOrigin: true,
           secure: false
         }
       }