Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eggjs/egg-view-assets
Manage frontend assets in development and production.
https://github.com/eggjs/egg-view-assets
assets egg egg-view eggjs roadhog umi webpack
Last synced: about 1 month ago
JSON representation
Manage frontend assets in development and production.
- Host: GitHub
- URL: https://github.com/eggjs/egg-view-assets
- Owner: eggjs
- License: mit
- Created: 2017-12-15T18:40:00.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T11:05:53.000Z (about 1 year ago)
- Last Synced: 2024-10-29T21:05:55.312Z (about 1 month ago)
- Topics: assets, egg, egg-view, eggjs, roadhog, umi, webpack
- Language: JavaScript
- Homepage:
- Size: 202 KB
- Stars: 53
- Watchers: 13
- Forks: 22
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-egg - egg-view-assets - Manage frontend assets in development and production. ![](https://img.shields.io/github/stars/eggjs/egg-view-assets.svg?style=social&label=Star) ![](https://img.shields.io/npm/dm/egg-view-assets.svg?style=flat-square) (仓库 / 插件)
README
# egg-view-assets
[![NPM version][npm-image]][npm-url]
[![Node.js CI](https://github.com/eggjs/egg-view-assets/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg-view-assets/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url][npm-image]: https://img.shields.io/npm/v/egg-view-assets.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-view-assets
[codecov-image]: https://img.shields.io/codecov/c/github/eggjs/egg-view-assets.svg?style=flat-square
[codecov-url]: https://codecov.io/github/eggjs/egg-view-assets?branch=master
[download-image]: https://img.shields.io/npm/dm/egg-view-assets.svg?style=flat-square
[download-url]: https://npmjs.org/package/egg-view-assetsManage frontend assets in development and production.
## Install
```bash
$ npm i egg-view-assets --save
```## Usage
Add `egg-view-assets` as plugin
```js
// {app_root}/config/plugin.js
exports.assets = {
enable: true,
package: 'egg-view-assets',
};
```Configuration, you can see full example in [egg-ant-design-pro].
```js
// {app_root}/config/config.default.js
exports.view = {
mapping: {
'.js': 'assets',
},
};exports.assets = {
devServer: {
command: 'roadhog dev',
port: 8000,
},
};
```See [config/config.default.js](config/config.default.js) for more detail.
## Questions & Suggestions
Please open an issue [here](https://github.com/eggjs/egg/issues).
## License
[MIT](LICENSE)
[egg-ant-design-pro]: https://github.com/eggjs/egg-ant-design-pro