Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Use components with webpack
JavaScript
branch: master

Merge pull request #2 from gunta/patch-1

Added repository field
latest commit 59eddcfa42
@sokra sokra authored

README.md

component for webpack

Usage

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

var ComponentPlugin = require("component-webpack-plugin");
module.exports = {
    plugins: [
        new ComponentPlugin();
    ]
}

Advanced usage

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"
        ]);
    ]
}

License

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

Something went wrong with that request. Please try again.