# dao-aliyun-oss-webpack-plugin

> 基于Webpack的Aliyun OSS上传工具

Latest version **1.0.3** (published 2019-03-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install dao-aliyun-oss-webpack-plugin
pnpm add dao-aliyun-oss-webpack-plugin
yarn add dao-aliyun-oss-webpack-plugin
bun add dao-aliyun-oss-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-03-26 |
| First published | 2019-03-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | 道心 |
| Maintainers | daoxin |
| Keywords | oss, aliyun, webpack, npm, nodejs |

## Links

- npm: https://www.npmjs.com/package/dao-aliyun-oss-webpack-plugin
- Repository: https://github.com/jsgu/dao-aliyun-oss-webpack-plugin
- Homepage: https://github.com/jsgu/dao-aliyun-oss-webpack-plugin#readme
- Issues: https://github.com/jsgu/dao-aliyun-oss-webpack-plugin/issues
- npm.io page: https://npm.io/package/dao-aliyun-oss-webpack-plugin

## Dependencies (1)

- [ali-oss](https://npm.io/package/ali-oss.md) ^6.1.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2019-03-26
- 1.0.2 — 2019-03-26
- 1.0.1 — 2019-03-22
- 1.0.0 — 2019-03-22

## README

# dao-aliyun-oss-webpack-plugin
基于webpack 的aliyun OSS上传工具

## 如何使用

1. 安装daoAliyunOssWebpackPlugin

```
$ npm i dao-aliyun-oss-webpack-plugin -D
```

2. 配置webpack.config.js

```
<!-- 在头部引入插件 -->
var daoAliyunOssWebpackPlugin = require("dao-aliyun-oss-webpack-plugin");
<!-- 配置plugins -->
.....
plugins: [
    new daoAliyunOssWebpackPlugin({
        buildPath: 'dist', //本地需要上传路径
        ossPath:'test',//上传存放目录（存储空间内部）
        region: 'oss-cn-beijing',//区域
        accessKeyId: 'xxxxxxxx',
        accessKeySecret: 'xxxxxxxxxxxxxxxxx',
        bucket: 'cdn'//存储空间
    })
]
```

3. 如其他环境如vue.config.js

```

let env = process.env.NODE_ENV == "development" ? "development" : "production";

module.exports = {
   ......
   configureWebpack: config => {
          // 为生产环境修改配置...
          if (env) {
            config.plugins.push(
                new daoAliyunOssWebpackPlugin({
                    buildPath: 'dist', //本地需要上传路径
                    ossPath:'test',//上传存放目录（存储空间内部）
                    region: 'oss-cn-beijing',//区域
                    accessKeyId: 'xxxxxxxx',
                    accessKeySecret: 'xxxxxxxxxxxxxxxxx',
                    bucket: 'cdn'//存储空间
                })
            )
        }
   }
   ......
```

---
_Source: https://npm.io/package/dao-aliyun-oss-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
