@uyun/cli-webpack-itsm-field
widget开发webpack配置库
Last updated 5 years ago by wumx .
ISC ·
$ cnpm install @uyun/cli-webpack-itsm-field 
Private package

@uyun/cli-webpack-widget

widget开发webpack配置库

使用

在使用@uyun/cli的项目下安装

yarn add @uyun/cli-webpack-widget -D

编辑everest.config.js,在plugins字段下添加本插件

module.exports = {
  // ...其他配置
  plugins: ['@uyun/cli-webpack-widget']
}

插件选项值说明

  • name: 入口名称,默认值为widgets,页面访问地址为/widgets.html
  • source: widget 源码目录,默认值为src/widgets
  • output: widget打包输出的目录,用于在开发时扫描目录进行预览,默认为./widgets
  • proxyTarget: 基础库 cdn 代理地址,默认为http://10.1.51.110:5050/,如不需要代理,则可把此项设置为false
  • requirejs: @uyun/cli-webpack-requirejs 插件的参数,默认值为undefined,具体配置参考@uyun/cli-webpack-requirejs

配置示例

module.exports = {
  // ...其他配置
  plugins: [
    [
      '@uyun/cli-webpack-widget',
      {
        name: 'widgets',
        source: './src/widgets',
        output: './widgets',
        proxyTarget: 'http://10.1.51.110:5050/',
        requirejs: {
          exclude: ['classnames'] // classnames不使用cdn,而是打包到widget中去
        }
      }
    ]
  ]
}

Current Tags

  • 0.0.9                                ...           latest (5 years ago)

11 Versions

  • 0.0.14                                ...           5 years ago
  • 0.0.13                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org