阅读(4194) (1)

Taro presets

2021-08-20 10:26:04 更新

presets

array

一个 preset 是一系列 Taro 插件的集合,配置语法同 pluginsmodule.exports = {

  1. // ...
  2. presets: [
  3. // 引入 npm 安装的插件集
  4. '@tarojs/preset-sth',
  5. // 引入 npm 安装的插件集,并传入插件参数
  6. ['@tarojs/plugin-sth', {
  7. arg0: 'xxx'
  8. }],
  9. // 从本地绝对路径引入插件集,同样如果需要传入参数也是如上
  10. '/absulute/path/preset/filename',
  11. ]
  12. }