mirror of
https://github.com/withastro/astro.git
synced 2025-08-26 08:43:05 +08:00
Fix/2177/log missing local network ip (#2732)
* feat: show "localhost" for local network IPs
* refactor: remove timestamps from addr logs
* fix: hide timestamp on null types
* feat: add emoji OS helper
* feat: make logs 100% nicer
* refactor: extract isLocalHost to util
* feat: update preview logs to match
* chore: add changeset
* fix: pull pkg version from package.json
* refactor: remove 👉 guys
* fix: devStart return type
* feat: inject process.env.PACKAGE_VERSION at build time
* feat: update unit test for hostname checks
Co-authored-by: Nate Moore <nate@skypack.dev>
This commit is contained in:
@ -28,7 +28,9 @@ export default async function build(...args) {
|
||||
.map((f) => f.replace(/^'/, '').replace(/'$/, '')); // Needed for Windows: glob strings contain surrounding string chars??? remove these
|
||||
let entryPoints = [].concat(...(await Promise.all(patterns.map((pattern) => glob(pattern, { filesOnly: true, absolute: true })))));
|
||||
|
||||
const { type = 'module', dependencies = {} } = await fs.readFile('./package.json').then((res) => JSON.parse(res.toString()));
|
||||
const { type = 'module', version, dependencies = {} } = await fs.readFile('./package.json').then((res) => JSON.parse(res.toString()));
|
||||
// expose PACKAGE_VERSION on process.env for CLI utils
|
||||
config.define = { 'process.env.PACKAGE_VERSION': JSON.stringify(version) };
|
||||
const format = type === 'module' ? 'esm' : 'cjs';
|
||||
const outdir = 'dist';
|
||||
await clean(outdir);
|
||||
|
Reference in New Issue
Block a user