You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@eggjs/development

Package Overview
Dependencies
Maintainers
13
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eggjs/development

development tool for egg

4.0.0
latest
Source
npmnpm
Version published
Weekly downloads
76
-44.53%
Maintainers
13
Weekly downloads
 
Created
Source

@eggjs/development

NPM version Node.js CI Test coverage Known Vulnerabilities npm download Node.js Version PRs Welcome

This is an egg plugin for local development, under development environment enabled by default, and closed under other environment.

@eggjs/development has been built-in for egg. It is enabled by default.

Requirements

  • egg >= 4.x

Configuration

see config/config.default.ts for more detail.

Features

  • Under development environment, Output request log in STDOUT, statistic and output all key parts time-consuming;
  • Watch file changes, and reload application;

About Reload

Under the following directory (including subdirectories) will watch file changes under development environment by default, trigger an Egg development environment server reload:

  • ${app_root}/app
  • ${app_root}/config
  • ${app_root}/mocks
  • ${app_root}/mocks_proxy
  • ${app_root}/app.js

set config.development.overrideDefault to true to skip defaults merge.

Under the following directory (including subdirectories) will ignore file changes under development environment by default:

  • ${app_root}/app/view
  • ${app_root}/app/assets
  • ${app_root}/app/public
  • ${app_root}/app/web

set config.development.overrideIgnore to true to skip defaults merge.

Developer can use config.reloadPattern(multimatch) to control whether to reload.

// config/config.default.ts
export default = {
  development: {
    // don't reload when css fileChanged
    // https://github.com/sindresorhus/multimatch
    reloadPattern: ['**', '!**/*.css'],
  },
};

Loader Trace

You can view loader trace for performance issue from http://127.0.0.1:7001/__loader_trace__

Questions & Suggestions

Please open an issue here.

License

MIT

Contributors

Contributors

Made with contributors-img.

Keywords

egg

FAQs

Package last updated on 11 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts