我正在尝试让我的资产捆绑工作,但使用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发布于 2019-01-15 07:33:13
在您的工具配置中是否有任何地方排除了node_modules目录?
https://github.com/quilljs/quill/issues/1175#issuecomment-266401537
https://stackoverflow.com/questions/54167613
复制相似问题