export-all-loader

1.1.0 • Public • Published

export-all-loader issues stars MIT

Babel preloader for Webpack

Transforms your export * from 'xxx' to export {...} which can avoid Object.defineProperty in IE8.

Installation

$ npm install export-all-loader

Quick Start

webpack config:

module.exports = {
    module: {
        preLoaders: [
            {
                test: /\.js$/,
                loader: 'export-all'
            }
        ]
    }
}

Examples

Input:

export * from 'a.js';
export * from 'b.js';

Output:

import {a1, a2} from 'a.js';
import {b1, b2} from 'b.js';
 
export {a1, a2, b1, b2}

Problems

  • Not support export default
  • Cannot use with babel-plugin-module-resolver

Package Sidebar

Install

npm i export-all-loader

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • gssan