rc-exports-loader

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i rc-exports-loader

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • adierkens