presets

array

一个 preset 是一系列 Taro 插件的集合,配置语法同 plugins

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