Update HMR. Make it true HMR. Add URL to page server props
This commit is contained in:
Vendored
+8
-4
@@ -1,7 +1,7 @@
|
||||
import chalk from "chalk";
|
||||
import AppNames from "./grab-app-names";
|
||||
const prefix = {
|
||||
info: chalk.cyan.bold("ℹ"),
|
||||
info: chalk.bgCyan.bold(" ℹnfo "),
|
||||
success: chalk.green.bold("✓"),
|
||||
error: chalk.red.bold("✗"),
|
||||
warn: chalk.yellow.bold("⚠"),
|
||||
@@ -9,12 +9,16 @@ const prefix = {
|
||||
watch: chalk.blue.bold("◉"),
|
||||
};
|
||||
export const log = {
|
||||
info: (msg) => console.log(`${prefix.info} ${chalk.white(msg)}`),
|
||||
success: (msg) => console.log(`${prefix.success} ${chalk.green(msg)}`),
|
||||
info: (msg, log) => {
|
||||
console.log(`${prefix.info} ${chalk.white(msg)}`, log || "");
|
||||
},
|
||||
success: (msg, log) => {
|
||||
console.log(`${prefix.success} ${chalk.green(msg)}`, log || "");
|
||||
},
|
||||
error: (msg) => console.error(`${prefix.error} ${chalk.red(String(msg))}`),
|
||||
warn: (msg) => console.warn(`${prefix.warn} ${chalk.yellow(msg)}`),
|
||||
build: (msg) => console.log(`${prefix.build} ${chalk.magenta(msg)}`),
|
||||
watch: (msg) => console.log(`${prefix.watch} ${chalk.blue(msg)}`),
|
||||
server: (url) => console.log(`${prefix.success} ${chalk.white("Server running on")} ${chalk.cyan.underline(url)}`),
|
||||
banner: () => console.log(`\n ${chalk.cyan.bold(AppNames.name)} ${chalk.gray(`v${AppNames.version}`)}\n`),
|
||||
banner: () => console.log(`\n ${chalk.cyan.bold(AppNames.name)} ${chalk.gray(`v${global.CURRENT_VERSION || AppNames["version"]}`)}\n`),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user