首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

ComponentWebpackPlugin

没有维护!

用法

代码语言:javascript
复制
var ComponentPlugin = require("component-webpack-plugin");
module.exports = {
    plugins: [
        new ComponentPlugin();
    ]
}

高级用法

代码语言:javascript
复制
var ComponentPlugin = require("component-webpack-plugin");
module.exports = {
    plugins: [
        new ComponentPlugin({
        			// 从 component.json 中加载 xyz 字段 in component.json
            xyz: true,
			        // 这等同于:xyz: "[file]"
						
						// 使用 xyz-loader 加载 xyz 字段
            xyz: "!xyz-loader![file]",
			       
			        // 默认为:
            // styles: "!style-loader!css-loader![file]"
        }, [
            // 查找路径
            "component"
        ]);
    ]
}

执照

扫码关注腾讯云开发者

领取腾讯云代金券