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');
output: {
path: distPath,
filename: "[name].js",
- library: "[name]",
+ library: "configurationApp",
libraryTarget: "umd2",
chunkFilename: "[name].js"
},
use: [{
loader: "babel-loader"
}]
+ },{
+ //don't minify images
+ test: /\.(png|gif|jpg|svg)$/,
+ use: [{
+ loader: 'url-loader',
+ options: {
+ limit: 10,
+ name: './images/[name].[ext]'
+ }
+ }]
}]
},
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,
}
}];
}