Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9a125a2

Browse filesBrowse files
authored
fix(v4): fix modern mode optional chaining syntax tranpilation (#6459)
closes #6449
1 parent b39726e commit 9a125a2
Copy full SHA for 9a125a2

File tree

Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed

‎packages/@vue/babel-preset-app/index.js

Copy file name to clipboardExpand all lines: packages/@vue/babel-preset-app/index.js
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@ function getModernTargets (targets) {
5050
)
5151

5252
// use the intersection of modern mode browsers and user defined targets config
53-
return getIntersectionTargets(targets, allModernTargets)
53+
const result = getIntersectionTargets(targets, allModernTargets)
54+
55+
// webpack 4 uses acorn 6, which does not support newer syntaxes such as optional chaining
56+
// so we have to add samsung 12 as a target to force transpiling these syntaxes
57+
// https://github.com/vuejs/vue-cli/issues/6449#issuecomment-828559068
58+
result.samsung = '12.0.0'
59+
60+
return result
5461
}
5562

5663
function getWCTargets (targets) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.