miniapp-compile-config
miniapp compile project config
Last updated 4 years ago by rax-publisher .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ npm install miniapp-compile-config 
SYNC missed versions from official npm registry.

miniapp-compile-config

小程序编译时工程公共配置设置。

方法

setAppConfig

参数
参数 类型 默认值 必填 描述
config object - ✔️ webpack chain config
userConfig object {} 当前小程序平台的用户配置,例如 { nativeConfig: { appId: 123 } }
options object - ✔️ options 子项见下表
options 子项
参数 类型 默认值 必填 描述
context object - ✔️ build plugin 上下文变量,包含运行时的各种环境信息
target string - ✔️ 构建的小程序平台类型,例如 miniapp/wechat-miniprogram
onGetWebpackConfig function - ✔️ 在工程获取 webpack 时触发的函数,可以在 build plugin 的 api 中获取
entryPath string - ✔️ 入口路径
outputPath string - ✔️ 输出路径

setComponentConfig

参数
参数 类型 默认值 必填 描述
config object - ✔️ webpack chain config
userConfig object {} 当前小程序平台的用户配置,例如 { nativeConfig: { appId: 123 } }
options object - ✔️ options 子项见下表
options 子项
参数 类型 默认值 必填 描述
context object - ✔️ build plugin 上下文变量,包含运行时的各种环境信息
target string - ✔️ 构建的小程序平台类型,例如 miniapp/wechat-miniprogram
entryPath string - ✔️ 入口路径
outputPath string - ✔️ 输出路径

使用

const { setAppConfig, setComponentConfig } = require('miniapp-compile-config');

// 应用
setAppConfig(config, userConfig, { context, target, onGetWebpackConfig, entryPath, outputPath });

// 组件
setComponentConfig(config, userConfig, { context, target, onGetWebpackConfig, entryPath, outputPath });

Current Tags

  • 0.3.0-alpha.2                                ...           alpha (3 years ago)
  • 0.3.4-1                                ...           beta (2 years ago)
  • 0.3.3                                ...           latest (2 years ago)
  • 0.3.0-rc.2                                ...           rc (3 years ago)

47 Versions

  • 0.3.4-1                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.3-1                                ...           2 years ago
  • 0.3.3-0                                ...           3 years ago
  • 0.3.2                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.1-beta.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.3.0-alpha.2                                ...           3 years ago
  • 0.2.6-4                                ...           3 years ago
  • 0.2.6-3                                ...           3 years ago
  • 0.3.0-rc.2                                ...           3 years ago
  • 0.3.0-rc.1                                ...           3 years ago
  • 0.2.6-2                                ...           3 years ago
  • 0.2.6-1                                ...           3 years ago
  • 0.2.6-0                                ...           3 years ago
  • 0.3.0-alpha.1                                ...           3 years ago
  • 0.2.5                                ...           3 years ago
  • 0.2.5-1                                ...           3 years ago
  • 0.2.5-0                                ...           3 years ago
  • 0.2.4                                ...           3 years ago
  • 0.2.3                                ...           3 years ago
  • 0.2.3-0                                ...           3 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.2-2                                ...           4 years ago
  • 0.2.2-1                                ...           4 years ago
  • 0.2.2-0                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.1-0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.7-6                                ...           4 years ago
  • 0.1.7-5                                ...           4 years ago
  • 0.1.7-4                                ...           4 years ago
  • 0.1.7-3                                ...           4 years ago
  • 0.1.7-2                                ...           4 years ago
  • 0.1.7-1                                ...           4 years ago
  • 0.1.7-0                                ...           4 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.2-1                                ...           4 years ago
  • 0.1.2-0                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.1.0-0                                ...           4 years ago
Maintainers (1)
Downloads
Total 39
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (13)
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE