Gulp-Uglify 错误:意外令牌:名称 (Quill)



我正在尝试让我的资产捆绑工作,但 Quill 失败了。我的bundle.conf.json

options: {
    uglify: ['production'], // uglify the resulting bundle in prod
    rev: ['production'], // rev the resulting bundle in prod
    transforms: {
      scripts: lazypipe().pipe(babel, {
        presets: ['es2015']
      }
      )
    }
  }
},
vendor: {
  scripts: [
    "./public/assets/bower_components/quill/quill.js",
    ],

我正在使用 babel 6。并且有错误的文件是quill.js(第一行):

import Quill from './core';

错误:

[09:34:13] ERROR in custom transforms for 'vendor.scripts':
[09:34:13] Error in plugin 'gulp-uglify'
Message:
/home/ubuntu/workspace/atlas3src/public/assets/bower_components/quill/quill.js: Unexpected token: name (Quill)
Details:
    fileName: /home/ubuntu/workspace/atlas3src/public/assets/bower_components/quill/quill.js
    lineNumber: 1

您的工具配置中是否有任何内容不包括node_modules目录?

https://github.com/quilljs/quill/issues/1175#issuecomment-266401537

相关内容

  • 没有找到相关文章

最新更新