ketr.photos/webpack.dev.js
James Ketrenos a2de430c38 Face editor working a bit more
Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
2020-02-09 17:38:31 -08:00

33 lines
862 B
JavaScript

const path = require("path");
const merge = require('webpack-merge')
const common = require('./webpack.common.js');
const webpack = require('webpack');
module.exports = merge(common, {
mode: "development",
devServer: {
contentBase: path.join(__dirname, "/"),
port: 8765,
publicPath: "http://localhost:8765/photos/dist/",
hotOnly: true,
disableHostCheck: true,
historyApiFallback: true,
proxy: {
// "/photos/api/*": "http://localhost:8123/",
"/photos/": {
target: "http://localhost:8123",
bypass: function(req, res, proxyOptions) {
console.log(req.url);
if (req.url.match(/^\/photos\/identities[/?]?/)) {
return 'index.html';
} else {
return null;
}
}
}
},
},
plugins: [new webpack.HotModuleReplacementPlugin()]
});