https://github.com/eggjs/development
egg plugin for development
https://github.com/eggjs/development
egg-development egg-plugin
Last synced: 5 months ago
JSON representation
egg plugin for development
- Host: GitHub
- URL: https://github.com/eggjs/development
- Owner: eggjs
- License: mit
- Created: 2016-07-13T01:54:46.000Z (over 9 years ago)
- Default Branch: 3.x
- Last Pushed: 2025-01-11T06:49:08.000Z (about 1 year ago)
- Last Synced: 2025-10-05T14:02:01.690Z (5 months ago)
- Topics: egg-development, egg-plugin
- Language: TypeScript
- Homepage:
- Size: 91.8 KB
- Stars: 58
- Watchers: 18
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-egg - egg-development - 开发环境配置。   (仓库 / [内置插件](https://eggjs.org/zh-cn/basics/plugin.html#%E6%8F%92%E4%BB%B6%E5%88%97%E8%A1%A8))
README
# egg-development
[![NPM version][npm-image]][npm-url]
[](https://github.com/eggjs/development/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]
[](https://nodejs.org/en/download/)
[npm-image]: https://img.shields.io/npm/v/egg-development.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-development
[codecov-image]: https://img.shields.io/codecov/c/github/eggjs/egg-development.svg?style=flat-square
[codecov-url]: https://codecov.io/github/eggjs/development?branch=3.x
[snyk-image]: https://snyk.io/test/npm/egg-development/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-development
[download-image]: https://img.shields.io/npm/dm/egg-development.svg?style=flat-square
[download-url]: https://npmjs.org/package/egg-development
This is an egg plugin for local development, under development environment enabled by default, and closed under other environment.
`egg-development` has been built-in for egg. It is enabled by default.
## Configuration
see [config/config.default.js](https://github.com/eggjs/development/blob/3.x/config/config.default.js) 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](https://github.com/sindresorhus/multimatch)) to control whether to reload.
```js
// config/config.default.js
exports.development = {
// don't reload when ts fileChanged
// https://github.com/sindresorhus/multimatch
reloadPattern: ['**', '!**/*.ts'],
};
```
### 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](https://github.com/eggjs/egg/issues).
## License
[MIT](LICENSE)
## Contributors
[](https://github.com/eggjs/development/graphs/contributors)
Made with [contributors-img](https://contrib.rocks).