widget开发webpack配置库
-本仓库已经废弃,请使用@uyun/cli-webpack-widget代替,使用方式和本库完全一样
@uyun/cli-webpack-widget-development到@uyun/cli-webpack-widget
# 删除@uyun/cli-webpack-widget-development
yarn remove @uyun/cli-webpack-widget-development
# 安装@uyun/cli-webpack-widget
yarn add @uyun/cli-webpack-widge -D
everest.config.js中插件@uyun/cli-webpack-widget-development为@uyun/cli-webpack-widgetmodule.exports = {
// ...其他配置
plugins: [
- '@uyun/cli-webpack-widget-development'
+ '@uyun/cli-webpack-widget'
]
}
在使用@uyun/cli的项目下安装
yarn add @uyun/cli-webpack-widget-development -D
编辑everest.config.js,在plugins字段下添加本插件
module.exports = {
// ...其他配置
plugins: ['@uyun/cli-webpack-widget-development']
}
widgets,页面访问地址为/widgets.htmlsrc/widgets./widgetshttp://10.1.51.110:5050/,如不需要代理,则可把此项设置为false@uyun/cli-webpack-requirejs 插件的参数,默认值为undefined,具体配置参考@uyun/cli-webpack-requirejs配置示例
module.exports = {
// ...其他配置
plugins: [
[
'@uyun/cli-webpack-widget-development',
{
name: 'widgets',
source: './src/widgets',
output: './widgets',
proxyTarget: 'http://10.1.51.110:5050/',
requirejs: {}
}
]
]
}
Copyright 2013 - present © cnpmjs.org