Skip to content

Build Error in Vue 2.7.15 After Latest locale.js Update #149

@mnvivek

Description

@mnvivek

Hi Team,

We are currently using Vue version 2.7.15. After the latest update made this morning in locale.js, we are encountering the following build error:

ERROR in ./node_modules/d3-format/src/locale.js
Module parse failed: Unexpected token (48:26)
You may need an appropriate loader to handle this file type.
|     // Compute the prefix and suffix.
|     // For SI-prefix, the suffix is lazily computed.
|     var prefix = (options?.prefix !== undefined ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""),
|         suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options?.suffix !== undefined ? options.suffix : "");
| 

It appears that the issue is related to optional chaining (?.) syntax, which is not being transpiled correctly in our current build setup.

Kindly check and help resolve this issue at the earliest.

Thanks & Regards,
Vivek MN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions