0.0.1 • Published 7 years ago

rc-exports-loader v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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'
        }
    ]    
}