mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-30 00:41:12 -05:00
fix(v4): fix modern mode optional chaining syntax tranpilation (#6459)
closes #6449
This commit is contained in:
@@ -50,7 +50,14 @@ function getModernTargets (targets) {
|
||||
)
|
||||
|
||||
// use the intersection of modern mode browsers and user defined targets config
|
||||
return getIntersectionTargets(targets, allModernTargets)
|
||||
const result = getIntersectionTargets(targets, allModernTargets)
|
||||
|
||||
// webpack 4 uses acorn 6, which does not support newer syntaxes such as optional chaining
|
||||
// so we have to add samsung 12 as a target to force transpiling these syntaxes
|
||||
// https://github.com/vuejs/vue-cli/issues/6449#issuecomment-828559068
|
||||
result.samsung = '12.0.0'
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
function getWCTargets (targets) {
|
||||
|
||||
Reference in New Issue
Block a user