# exp-loader

> Exp features loader for webpack

Latest version **0.1.0** (published 2016-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install exp-loader
pnpm add exp-loader
yarn add exp-loader
bun add exp-loader
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-09-22 |
| First published | 2016-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | bluishoul@gmail.com |
| Maintainers | bluishoul |
| Keywords | exp, features, webpack, loader |

## Links

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

## Dependencies (1)

- [loader-utils](https://npm.io/package/loader-utils.md) ^0.2.16

## 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

- 0.1.0 (latest) — 2016-09-22

## README

# exp-loader for Webpack
Enable experiment feature during the building process

## Usage

[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)

### Webpack Config

```
{
    module: {
        loaders: [
            {
                test: /\.jsx?$/,
                loader: 'exp',
                include: __dirname + '/src',
                exclude: __dirname + '/node_modules',
            }
        ]
    }
}
```

### Use in app

Build specific version of `feature.js`

#### directory structure

```
src
├── feature.1.js
├── feature.js
└── index.js
```
equals to: 
```
src
├── exp
│   └── feature.1.js
├── feature.js
└── index.js
```

#### set Node env variable

```
EXP_VERSION=1 webpack --config webpack.config.js --progress
```

## Run an example

Clone this project, then run those commands:

```
npm install
npm run example
```

then open `example/index.html` in the browser

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