Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a dev server banner message #178

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading