# webpack-eliminate-loader

> > speed up build

Latest version **1.1.1** (published 2019-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-eliminate-loader
pnpm add webpack-eliminate-loader
yarn add webpack-eliminate-loader
bun add webpack-eliminate-loader
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2019-10-15 |
| First published | 2019-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 27.4 KB |
| Known vulnerabilities | 0 (+7 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | jiangweixian1994 |
| Keywords | webpack, webpack-loader, webpack-eliminate-loader, build-in-need |

## Links

- npm: https://www.npmjs.com/package/webpack-eliminate-loader
- Repository: https://github.com/JiangWeixian/webpack-eliminate-loader
- Homepage: https://github.com/JiangWeixian/webpack-eliminate-loader#readme
- Issues: https://github.com/JiangWeixian/webpack-eliminate-loader/issues
- npm.io page: https://npm.io/package/webpack-eliminate-loader

## Dependencies (5)

- [webpack](https://npm.io/package/webpack.md) 4.39.3
- [minimatch](https://npm.io/package/minimatch.md) 3.0.4
- [loader-utils](https://npm.io/package/loader-utils.md) 1.2.3
- [schema-utils](https://npm.io/package/schema-utils.md) 2.1.0
- [lodash.isempty](https://npm.io/package/lodash.isempty.md) 4.4.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.1.1 (latest) — 2019-10-15
- 1.1.0 — 2019-10-15
- 1.0.4 — 2019-09-10
- 1.0.3 — 2019-09-10
- 1.0.2 — 2019-09-09
- 1.0.1 — 2019-09-09
- 1.0.1-4 — 2019-09-09
- 1.0.1-3 — 2019-09-09
- 1.0.1-2 — 2019-09-09
- 1.0.1-1 — 2019-09-09
- 1.0.1-0 — 2019-09-09
- 1.0.0 — 2019-09-09
- 0.1.1-1 — 2019-09-02
- 0.1.1-0 — 2019-09-02
- 0.1.0 — 2019-09-02
- … 6 more at https://npm.io/package/webpack-eliminate-loader/versions

## README

# webpack-eliminate-loader
> speed up build

[![npm](https://img.shields.io/npm/v/webpack-eliminate-loader?style=for-the-badge)](https://github.com/JiangWeixian/templates/tree/master/packages/core) [![GitHub](https://img.shields.io/github/license/jiangweixian/webpack-eliminate-loader?style=for-the-badge)](https://github.com/JiangWeixian/templates/tree/master/packages/rollup-template)

- [why-this-repo?](https://github.com/JiangWeixian/webpack-eliminate-loader/blob/master/docs/why-this-repo.md)
- [Limits](#limits)
- [Usage](#useage)
- [Options](#options)

## Limits

only speed-up webpack in `development` mode build up.

## Useage
> see more [examples](https://github.com/JiangWeixian/webpack-eliminate-loader/tree/master/examples)

`npm install webpack-eliminate-loader --save-dev`

**In webpack**, put after at the bottom.

```js
// ... other loaders
{
  loader: 'webpack-eliminate-loader',
  options: {
    exclude: ['src/pages/Home'],
    preset: ['react-route'],
  },
},
```

**In webpack-chain**, put after at the bottom.

```js
// ... other loaders
const tsUse = config.module.rules.get('ts');
tsUse
  .use('webpack-eliminate-loader')
  .loader('webpack-eliminate-loader')
  .options({
    presets: ['umi-route', 'umi-rematch'],
    include: ['src/pages/page-one'],
  })
  .after('ts-loader');
```

## Options

| Options | Usage | Default |
|:---|:---:|---:|
| presets| the way of how this loader work. Currently, only support `umi-route`, `react-route`, `umi-rematch`(need works with `*-route`) | |
| include | `glob-pattern-like` string, only build-up pages-in-include, we will have some default include pages | [] |
| exclude | `glob-pattern-like` string, will not build-up pages-in-exclude  | [] |

**NOTE:**

In future, it may support custom-preset. For now, if you want use offical presets, you need keep same `project-pages-structure` like `examples`

- `react-route` - `examples/basic-react`
- `umi-route and umi-rematch` - `examples/umi-react`

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