Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Ensure using es6 for web3.min.js #6541

@Muhammad-Altabba

Description

@Muhammad-Altabba

Expected behavior

web3.min.js has syntax compatible with es6.

Actual behavior

The minified build (web3.min.js) contains the syntax ?. which is called Optional Chaining (https://2ality.com/2019/07/optional-chaining.html), that is es2020 which is far from es6 (ES2015).

Steps to reproduce the behavior

Check: #6472 (comment)

Logs

./node_modules/web3/dist/web3.min.js 4323:57
Module parse failed: Unexpected token (4323:57)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|                 b = f(y * v),
|                 E = f(h * v),
>                 _ = g.BASE.multiplyAndAddUnsafe(l, b, E)?.toAffine();
|               return !!_ && f(_.x) === h;
|             },

Environment

https://github.com/jasonhtpham/react-boilerplate

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions