npm.io
0.0.1 • Published 9 years ago

rc-exports-loader

Licence
MIT
Version
0.0.1
Deps
0
Vulns
0
Weekly
0

rc-exports-loader

A webpack loader for babel-style rc files

Usage

Given a file such as:

#.testrc
{
    plugins: [
        'foo'
    ]
}

This will transform the file to export the object for usage in import statements

import test from './testrc';

test.plugins; // [ 'foo' ]

Config

Basic webpack.config.js syntax applies:


module: {
    rules: [
        {
            test: /\.testrc$/,
            use: 'rc-exports-loader'
        }
    ]    
}

Keywords