W3cubDocs

/webpack

ComponentWebpackPlugin

UNMAINTAINED!

Usage

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)

© JS Foundation and other contributors
Licensed under the Creative Commons Attribution License 4.0.
https://webpack.js.org/plugins/component-webpack-plugin