# webpack-auto-vuex-store

> ``` yarn add --dev webpack-auto-vuex-store ```

Latest version **1.0.2** (published 2019-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-auto-vuex-store
pnpm add webpack-auto-vuex-store
yarn add webpack-auto-vuex-store
bun add webpack-auto-vuex-store
```

## 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.2 |
| Published | 2019-05-14 |
| First published | 2019-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | wdaglb |

## Links

- npm: https://www.npmjs.com/package/webpack-auto-vuex-store
- npm.io page: https://npm.io/package/webpack-auto-vuex-store

## Recent versions

- 1.0.2 (latest) — 2019-05-14
- 1.0.1 — 2019-03-21
- 1.0.0 — 2019-03-20

## README

## 安装

```
yarn add --dev webpack-auto-vuex-store
```

## 使用

> 现在你应该使用@vue/cli了，直接在vue.config.js引入plugin

```javascript
const WebpackAutoVuexStore = require('webpack-auto-vuex-store')


module.exports = {
    ...,
    configureWebpack: {
        plugins: [
            new WebpackAutoVuexStore({
                path: 'src/stores', // 相对项目根目录的状态目录
                table: 'table',     // 生成的状态表文件名,生成于状态目录下
                modules: 'modules'  // 监听的目录,相对状态目录
            })
        ]
    }
}

```

### 有什么作用？

> WebpackAutoVuexStore会把指定目录下作为状态目录，进行遍历操作进而生成vuex的modules一个表

例如：
```javascript
export default {
   'Auth': require('./modules/Auth.js').default,
   'Position': require('./modules/Position.js').default,
   'Site': require('./modules/Site.js').default,
   'Store': require('./modules/Store.js').default,
   'User': require('./modules/User.js').default,
   'www': require('./modules/www.js').default,
   'www/tewt': require('./modules/www/tewt.js').default,
}
```

麻麻再也不用担心我一个个import模块了

---
_Source: https://npm.io/package/webpack-auto-vuex-store · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
