component-webpack-plugin

Use components with webpack

component for webpack

see an example here: webpack/webpack/examples/component

var ComponentPlugin = require("component-webpack-plugin");
module.exports = {
    plugins: [
        new ComponentPlugin();
    ]
}
var ComponentPlugin = require("component-webpack-plugin");
module.exports = {
    plugins: [
        new ComponentPlugin({
            // Load xyz field in component.json 
            xyz: true,
            // This is equal to: xyz: "[file]" 
            
            // Load xyz field with the xyz-loader 
            xyz: "!xyz-loader![file]",
            
            // This is default: 
            // styles: "!style-loader!css-loader![file]" 
        }, [
            // Lookup paths 
            "component"
        ]);
    ]
}

MIT (http://www.opensource.org/licenses/mit-license.php)