“汇总”“异步”调用时出现意外的令牌

时间:2017-02-07 21:15:52

标签: javascript async-await rollupjs

我在babel工作的项目中有异步支持,我已经复制并粘贴了我的设置。我汇总处理超过async声明。为什么不能汇总进程异步/等待?如何成功构建我的代码?

  

解析/Users/thomasreggi/Desktop/PAS/PAS-api/src/appProxypass/index.js时出错:/ Users / thomasreggi / Desktop / PAS / PAS-api / src / appProxypass中的意外标记(43:44) /index.js

module.exports = {
  exports: 'named',
  external: [],
  entry: './src/appProxypass/index.js',
  dest: './packages/proxypass-app/index.js',
  format: 'cjs',
  plugins: [
    require('rollup-plugin-commonjs')(),
    require('rollup-plugin-babel')({
      "babelrc": false,
      "exclude": 'packages/proxypass-app/node_modules/**',
      "include": 'packages/proxypass-app/**',
      "runtimeHelpers": true,
      "externalHelpers": true,
      "plugins": [
        "transform-async-to-generator",
        "syntax-async-functions",
        "transform-flow-strip-types",
        "transform-runtime",
        "transform-class-properties",
        [
          "transform-strict-mode",
          {
            "strict": false
          }
        ]
      ],
      "presets": [
        "es2015-rollup",
        "stage-2"
      ]
    })
  ]
}

0 个答案:

没有答案