0.1.0 • Published 8 years ago

exp-loader v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

exp-loader for Webpack

Enable experiment feature during the building process

Usage

Documentation: Using loaders

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

0.1.0

8 years ago