aux-search/frontend/config/webpack.dev.js
github-actions[bot] 84ce7fdf52
Update npm dependencies (also flake.lock: Update) (#532)
* flake.lock: Update

Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/c0e246b9b83f637f4681389ecabcb2681b4f3af0' (2022-08-07)
  → 'github:numtide/flake-utils/6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817' (2022-10-29)
• Updated input 'nixos-org-configurations':
    'github:NixOS/nixos-org-configurations/569797100aac69780a12542c2143bb741380d4ec' (2022-08-17)
  → 'github:NixOS/nixos-org-configurations/cebfd15c30724cadacf85b5fd950dc1070c4eb7d' (2022-10-26)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f3d0897be466aa09a37f6bf59e62c360c3f9a6cc' (2022-08-25)
  → 'github:NixOS/nixpkgs/448a599c49978c2794401bfc3a2e1fba1a8663be' (2022-10-28)

* Switch from yarn to npm for frontend

also update all the npm dependencies

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rok Garbas <rok@garbas.si>
2022-11-03 22:26:58 +01:00

35 lines
892 B
JavaScript

const path = require('path');
const {merge} = require('webpack-merge');
const common = require('./webpack.common.js');
const dev = {
mode: 'development',
devServer: {
hot: "only",
client: {
logging: "info"
},
static: {directory: path.join(__dirname, "../src/assets")},
devMiddleware: {
publicPath: "/",
stats: "errors-only"
},
historyApiFallback: true,
// feel free to delete this section if you don't need anything like this
onBeforeSetupMiddleware: function (devServer) {
// on port 3000
devServer.app.get("/test", function (req, res) {
res.json({result: "You reached the dev server"});
});
}
},
};
module.exports = env => {
const withDebug = !env.nodebug;
return merge(common(withDebug), dev);
}