Skip to content
Manage frontend assets in development and production.
Branch: master
Clone or download
Latest commit 467f8b9 Jan 29, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github init Dec 20, 2017
app/extend refactor(assets_context): more API (#3) Mar 13, 2018
config fix: port should be paased from agent to app (#25) Jan 7, 2019
lib
test fix: use w3c valid link format (#29) Jan 29, 2019
.autod.conf.js
.eslintignore
.eslintrc
.gitignore feat: first implement (#1) Mar 13, 2018
.travis.yml refactor: no need to encode context with base64 (#21) Aug 20, 2018
History.md
LICENSE
README.md docs: update readme (#6) Mar 15, 2018
agent.js fix: port should be paased from agent to app (#25) Jan 7, 2019
app.js fix(devServer): reset port when app get port from agent (#28) Jan 8, 2019
appveyor.yml
package.json

README.md

egg-view-assets

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Manage frontend assets in development and production.

Install

$ npm i egg-view-assets --save

Usage

Add egg-view-assets as plugin

// {app_root}/config/plugin.js
exports.assets = {
  enable: true,
  package: 'egg-view-assets',
};

Configuration, you can see full example in egg-ant-design-pro.

// {app_root}/config/config.default.js
exports.view = {
  mapping: {
    '.js': 'assets',
  },
};

exports.assets = {
  devServer: {
    command: 'roadhog dev',
    port: 8000,
  },
};

See config/config.default.js for more detail.

Questions & Suggestions

Please open an issue here.

License

MIT

You can’t perform that action at this time.