Skip to content

Commit

Permalink
Merge pull request #178 from GreenAsJade/banner_message
Browse files Browse the repository at this point in the history
Add a dev server banner message
  • Loading branch information
anoek authored Sep 17, 2024
2 parents 0810d91 + 1968664 commit a16dc89
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const webpack = require("webpack");
const pkg = require("./package.json");
const TerserPlugin = require("terser-webpack-plugin");

const DEV_SERVER_PORT = 9000;

let plugins = [];

plugins.push(
Expand Down Expand Up @@ -162,7 +164,7 @@ module.exports = (env, argv) => {
devServer: {
compress: true,
host: "0.0.0.0",
port: 9000,
port: DEV_SERVER_PORT,
allowedHosts: ["all"],

static: [
Expand All @@ -182,6 +184,14 @@ module.exports = (env, argv) => {
writeToDisk: true,
},
hot: false,
setupMiddlewares: (middlewares, devServer) => {
console.log("------------------");
console.log("Demo board is served at http://localhost:" + DEV_SERVER_PORT);

console.log("Check your changes there!");
console.log("------------------");
return middlewares;
},
},
}),
];
Expand Down

0 comments on commit a16dc89

Please sign in to comment.