@yqg/webpack-plugin
v5.0.13
Published
Webpack Plugins for YQG
Downloads
7
Maintainers
Keywords
Readme
@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
}