我正试图使我的资产捆绑工作,但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",
],
我正在使用babel6。错误文件为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
答案 0 :(得分:0)
您的工具配置中是否存在除node_modules
目录之外的任何内容?
https://github.com/quilljs/quill/issues/1175#issuecomment-266401537