yg-view-assets

1.6.2 • Public • Published

yg-view-assets

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

Manage frontend assets in development and production.

Install

$ npm i yg-view-assets --save

Usage

Add yg-view-assets as plugin

// {app_root}/config/plugin.js
exports.assets = {
  enable: true,
  package: 'yg-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.

manifest refactor by roy

增加 validManifest 默认验证,传入false不验证

config.assets = {
  validManifest: false
}

Questions & Suggestions

Please open an issue here.

License

MIT

Package Sidebar

Install

npm i yg-view-assets

Weekly Downloads

0

Version

1.6.2

License

MIT

Unpacked Size

24.1 kB

Total Files

14

Last publish

Collaborators

  • fugangb