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

5.0.12 • 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
}

/@yqg/webpack-plugin/

    Package Sidebar

    Install

    npm i @yqg/webpack-plugin

    Weekly Downloads

    16

    Version

    5.0.12

    License

    MIT

    Unpacked Size

    47.7 kB

    Total Files

    16

    Last publish

    Collaborators

    • devmsg
    • hongweihu
    • iuwoo
    • ykboluo
    • yqg-owner
    • jxlnljt
    • yulodl
    • center620
    • zhchy
    • guxiaodai
    • northseacoder
    • wenxiujiang
    • zzj5470816
    • lixiaoxue
    • yyh_
    • szll
    • zhayoyang