这是流程,mvn build调用grunt,后者调用babel生成dojo.js.未压缩.js。这个库将被其他js模块使用。
巴别尔克是这样的
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"array-includes",
"@babel/plugin-transform-object-assign",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-arrow-functions",
"@babel/plugin-transform-block-scoping",
"@babel/plugin-transform-classes",
"@babel/plugin-transform-destructuring",
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-syntax-async-generators",
"@babel/plugin-transform-regenerator"
]
}
在一个干净的文件夹中,在“mvnclean install”之后,我确实看到了文件夹节点_modules/@babel/plugin transform正在分解结构。
dojo.js.uncompressed.js:82427: ERROR - Parse error. destructuring assignment forbidden
var MyFunction = function({inner: inner}) {