umi-plugin-marmot
v1.0.8
Published
upload asserts to ali oss by marmot client when built
Downloads
8
Readme
umi-plugin-marmot
Upload asserts to ali oss by marmot client when built
Usage
yarn add umi-plugin-marmot --dev
npm install umi-plugin-marmot --save-dev
Configure in .umirc.production.ts
This plugin works when the environment
NODE_ENV
setted byproduction
. By the way,if you set environment variableUPLOAD_CDN
disabled
, this plugin will be disabled.
| option | not null | description | | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | accessKeyId | true | It should be unique, and you should get one from zyh or txy. | | accessKeySecret | true | It should be unique, and you should get one from zyh or txy. | | storagePath | false | It should be unique, and you should get one from zyh or txy. It's optional, so you can just not pass it | | exclude | false | Regular expression to decide which files to ignore. It's optional, so you can just not pass it, and the plugin will exclude only html files | | include | false | Regular expression to decide which files to built. It's optional, so you can just not pass it, and the plugin will include all the files, include will work only after the exclude has done its job |
export default {
marmot: {
accessKeyId: 'id',
accessKeySecret: 'secret',
storagePath: 'storage/path',
},
};
Publish
# 1. update version
$ npm version minor
# 2. update patch version
$ npm version patch
# 3. publish
$ npm publish