@yqg/webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

5.0.13 • Public • Published

@yqg/webpack-plugin

webpack plugins for yqg.

WebpackVersionPlugin

Add a json file to your webpack bundle file with the webpack hash and time.

This can be used to help single page apps detect a new version.

Usage

// webpack.config.js
{
  plugins: [
    new WebpackVersionPlugin(options)
  ]
}
// Options
interface Options {
  filename?: string; // version.json by default
}

Output

{
  "version": "44c56d816a031ada87401d28a1339b9a",
  "date": "2018-06-26T12:07:16.683Z"
}

WebpackQiniuUploadPlugin

Upload Media Sources to qiniu.

Usage

// webpack.config.js
{
  plugins: [
    new WebpackQiniuUploadPlugin(options)
  ]
}
// Options
interface Options {
  bucket: string;
  accessKey: string;
  secretKey: string;
  dir: string; // 一般业务需要配置 bucket,存放资源的目录,比如:'cdn/yqg-tech/static'
}

WebpackI18nPlugin

Add a i18n json file to your webpack build file.

Useage

// webpack.config.js
{
  plugins: [
    new WebpackI18nPlugin(options)
  ]
}
// Options
interface Options {
  filename?: string; // i18n.json by default
  getI18nContent?: () => Promise<Object>; // get i18n json content by yourself
}

Readme

Keywords

none

Package Sidebar

Install

npm i @yqg/webpack-plugin

Weekly Downloads

4

Version

5.0.13

License

MIT

Unpacked Size

48.6 kB

Total Files

16

Last publish

Collaborators

  • yqg-owner
  • yulodl
  • center620
  • guxiaodai
  • northseacoder
  • zzj5470816
  • yyh_
  • szll
  • zhayoyang
  • hongweihu
  • devmsg
  • ykboluo
  • iuwoo
  • runrunr
  • remmurd1
  • lwwshare
  • hanyefeng
  • xuliangmost
  • zhenkunliu2
  • shaotanliang
  • wangxuehao_yqg
  • mozhichen
  • ly-wangtao
  • elgar_adah