# wgather-pack-webpack

> 该套件应用于由fie init bdf生成的项目，开发者也可以通过修改config配置来适应各种项目适配

Latest version **0.0.13** (published 2018-10-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install wgather-pack-webpack
pnpm add wgather-pack-webpack
yarn add wgather-pack-webpack
bun add wgather-pack-webpack
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2018-10-09 |
| First published | 2018-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 33 |
| Unpacked size | 40.4 KB |
| Known vulnerabilities | 0 (+5 in 4 direct dependencies) |
| Install scripts | no |
| Author | 洛丹 |
| Maintainers | sheweichun |

## Links

- npm: https://www.npmjs.com/package/wgather-pack-webpack
- Repository: git@gitlab.alibaba-inc.com:taefed/gather
- npm.io page: https://npm.io/package/wgather-pack-webpack

## Dependencies (33)

- [less](https://npm.io/package/less.md) ^2.7.2
- [open](https://npm.io/package/open.md) ^0.0.5
- [dayjs](https://npm.io/package/dayjs.md) ^1.7.5
- [express](https://npm.io/package/express.md) ^4.15.3
- [webpack](https://npm.io/package/webpack.md) ^3.5.5
- [happypack](https://npm.io/package/happypack.md) ^3.1.0
- [node-sass](https://npm.io/package/node-sass.md) ^4.9.2
- [babel-core](https://npm.io/package/babel-core.md) ^6.25.0
- [css-loader](https://npm.io/package/css-loader.md) ^0.28.4
- [url-loader](https://npm.io/package/url-loader.md) ^0.5.9
- [file-loader](https://npm.io/package/file-loader.md) ^0.11.2
- [less-loader](https://npm.io/package/less-loader.md) ^4.0.5
- [sass-loader](https://npm.io/package/sass-loader.md) ^6.0.6
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^7.1.2
- [babel-loader](https://npm.io/package/babel-loader.md) ^7.1.1
- [style-loader](https://npm.io/package/style-loader.md) ^0.18.2
- [wgather-core](https://npm.io/package/wgather-core.md) ^0.0.12
- [worker-loader](https://npm.io/package/worker-loader.md) ^1.1.1
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^2.0.6
- [webpack-sources](https://npm.io/package/webpack-sources.md) ^1.1.0
- [react-hot-loader](https://npm.io/package/react-hot-loader.md) ^3.0.0-beta.7
- [babel-plugin-next](https://npm.io/package/babel-plugin-next.md) ^0.0.4
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) ^6.24.1
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.24.1
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^2.30.1
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.24.1
- [webpack-dev-middleware](https://npm.io/package/webpack-dev-middleware.md) ^1.12.0
- [webpack-hot-middleware](https://npm.io/package/webpack-hot-middleware.md) ^2.18.2
- [uglifyjs-webpack-plugin](https://npm.io/package/uglifyjs-webpack-plugin.md) ^0.4.6
- [webpack-bundle-analyzer](https://npm.io/package/webpack-bundle-analyzer.md) ^2.8.3
- [extract-text-webpack-plugin](https://npm.io/package/extract-text-webpack-plugin.md) ^3.0.0
- [progress-bar-webpack-plugin](https://npm.io/package/progress-bar-webpack-plugin.md) ^1.10.0
- [babel-plugin-transform-decorators-legacy](https://npm.io/package/babel-plugin-transform-decorators-legacy.md) ^1.3.4

## Recent versions

- 0.0.13 (latest) — 2018-10-09
- 0.0.12 — 2018-09-19
- 0.0.11 — 2018-09-19
- 0.0.10 — 2018-09-18
- 0.0.9 — 2018-09-18

## README

# gather-pack-webpack
 该套件应用于由fie init bdf生成的项目，开发者也可以通过修改config配置来适应各种项目适配


## 安装
无需开发者手动安装，在pack配置设置，gather会自动接管


## pack配置
  gather.conf.js中对应的packOption,如下都是默认值

```javascript
{
    dll: false,  //是否启用DllPlugin,会读取package.json中的dependencies
    notdll: [],  //排除dependencies中一些包
    modules: false, //是否启用css module
    happypack: false, //是否启用happypack
    less: false, //是否需要less
    autoInstall : true //是否自动安装依赖
    sass: false, //是否需要sass
    config:{} //见下面的config配置
}
```

## config配置
  如下都是默认值

```javascript
{
  pages: 'src/pages',  //默认搜索入口目录
  pageEntry: 'app.js',  //每一个目录中默认的入口文件
  // entry:{},   //单文件开发的配置
  dest: 'build',    //编译后输出的目录
  gatherwork: '.gather',   //gather在项目中会使用的文件夹
  dllLib: 'gatherLib',   //开发模式生成的dll的名字
  dllVendor: 'gatherVendor', //生产模式生成的dll的名字
  analyzerOpt: {},  //webpack-bundle-analyzer插件的配置项
  contentBase: [],  //开发模式的静态目录配置
  autoprefixer: {},  //autoprefixer的默认配置
  babel: {   //babel的默认配置
    babelrc: false,
    presets: ['react', ['es2015', { modules: false }], 'stage-0'],
    plugins: [
      'transform-decorators-legacy',
      [
        'next',
        {
          jsName: '@alife/next',
          cssName: '@alife/next',
          dir: 'lib',
          noStyle: true,
        },
      ],
    ],
    env: {
      development: {
        presets: ['react-hmre'],
      },
    },
  },
  localIdentName: '[name][local]-[hash:base64:5]', //css module的默认配置
  uglyOpt: {  //webpack.optimize.UglifyJsPlugin的配置 
    compress: {
      unused: true,
      dead_code: true,
      warnings: false,
    },
    mangle: {
      except: ['$', 'exports', 'require'],
    },
    output: {
      ascii_only: true,
    },
  },
  resolve: {  //webpack的resolve中的alias配置
    util: realPath('src/util'),
    styles: realPath('src/less'),
    commons: realPath('src/components'),
    mixins: realPath('src/mixins'),
    actions: realPath('src/pages/isv/actions'),
    api: realPath('src/pages/isv/api'),
  }
}

```

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